Running Application Set E2E tests¶
The E2E tests will run automatically on each PR/commit as part of a GitHub action. You may also run these tests locally to verify the functionality, as described below.
Argo CD Prerequisites¶
If/when ApplicationSet functionality is integrated with Argo CD, this will become significantly easier to setup, but in the mean time you must setup a standalone Argo CD dev environment and start Argo CD configured for E2E tests.
A) Setup Argo CD dev environment¶
- Clone the Argo CD source, and setup an Argo CD dev environment:
- Next, run
make start-e2eand wait for Argo CD to startup successfully
make test-e2e, and wait for a significant number of the tests to run successfully, in order to verify that your environment is correctly setup
- Stop the
B) Ensure that port 8081 is exposed in the Argo CD test server container:¶
- In the
Makefilefile at the root of the Argo CD repo:
- Add the following to this location in the Makefile
-p 4000:4000 \
-p 4000:4000 -p 8081:8081 \
- This exposes port 8081, which is required for ApplicationSets functionality
A) Ensure that Argo CD is running and configured for E2E test:¶
make start-e2eunder Argo CD dev environment
- Wait for the Argo CD processes to start within the container
- This process should remaining running through the tests
- Verify that:
make test-e2eshould have set your active namespace so that it is now the
kubectl config view --minify | grep namespace:)
- You have exposed port 8081 in the Makefile (as described in prerequisites).
docker psshould show port 8081 as mapped to an accessible IP.
B) Apply the ApplicationSet CRDs, and build the controller:¶
kubectl apply -f manifests/crds/argoproj.io_applicationsets.yaml make build
C) Run the application set controller configured for E2E tests:¶
- This process should remain running while the Application Set E2E tests run.
D) Run the tests:¶