-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: run e2e tests with testcontainers #19003
base: master
Are you sure you want to change the base?
chore: run e2e tests with testcontainers #19003
Conversation
❗ Preview Environment deployment failed on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
✅ Preview Environment created on Bunnyshell but will not be auto-deployedSee: Environment Details Available commands (reply to this comment):
|
cba2c14
to
6654416
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19003 +/- ##
==========================================
- Coverage 50.65% 50.64% -0.01%
==========================================
Files 315 315
Lines 43286 43260 -26
==========================================
- Hits 21926 21911 -15
+ Misses 18861 18846 -15
- Partials 2499 2503 +4 ☔ View full report in Codecov by Sentry. |
42d5c4c
to
a50a826
Compare
- name: Run E2E testsuite | ||
run: | | ||
set -x | ||
make test-e2e-local | ||
goreman run stop-all || echo "goreman trouble" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added to make sure the argocd processes would shut down gracefully and have the golang coverage from the e2e "flushed" to the files. We should just confirm that test-containers send the proper signals to cause the flush to happen.
(Just commenting about the contributors meeting today as a reminder :))
This change allows for the use of testcontainers to run E2E tests. Why would we want this? Mainly for three reasons: 1. IDE friendlier 2. Debugger friendlier 3. Much easier to setup It's a "one click" way (or a simple `go test e2e` way) to run E2E tests, set the environment variable `ARGOCD_E2E_USE_TESTCONTAINERS=true` and you're off to the races. This has a bunch of changes, but the majority of them is simply creating builders for each of the affected controller commands to separate builders, which are used to be able instantiate each controller programatically. The commands make use of these builders to set the flags as they previously did. Redis, K3S and the E2E server are run as testcontainers when running the E2E tests. The controllers are run in-process but spun off into separate goroutines. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
This works just as nicely and reduces the scope of the changes. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
This is required since we're running the controllers outside a container. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
This is to prevent the "dubious ownership" errors in Git. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Since there is no need to set a specific serviceaccount right now for a given controller, revert these changes. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
The repo-server and api server both needs to be able to have their ports configured. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Hardcode helm index port for now, but randomize api server and repo server ports. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
ceb6b4e
to
83a93a5
Compare
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
This change allows for the use of testcontainers to run E2E tests. Why would we want this? Mainly for three reasons:
It's a "one click" way (or a simple
go test e2e
way) to run E2E tests. To run using testcontainers, rungo test e2e
ormake test-e2e-local
- there is no need to do anything else.This has a bunch of changes, but the majority of them is simply extracting the command flags from the affected controller commands to separate builders, which are then used for instantiating each controller programatically. The commands make use of these builders to set the flags as they previously did, so from a user perspective nothing changes.
Redis, K3S and the E2E server are run as testcontainers when running the E2E tests. The controllers are run in-process but spun off into separate goroutines.
Checklist: