-
Notifications
You must be signed in to change notification settings - Fork 28
build: adopt Magefile for running acceptance tests #256
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
base: main
Are you sure you want to change the base?
Conversation
eliobischof
left a comment
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.
In a go repo, Mage is definitely better than Make :-)
Let's update the CONTRIBUTING.md
| fmt.Println("golangci-lint not found – falling back to `go vet`") | ||
| return sh.RunV("go", "vet", "./...") |
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.
Let's try to have reproducible results by requiring a specific version of golangci-lint pinned in go.mod?
https://go.dev/doc/go1.24#tools
| // Extra buffer so that flaky startup races are less likely. | ||
| if err := sh.RunV("sleep", "30"); err != nil { | ||
| fmt.Println("warning: sleep command failed:", err) | ||
| } |
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.
Is there a condition we could retry quering until it is satisfied?
Updates SVG test fixtures to include XML declaration and namespace attributes required by Zitadel v4.7.0's API validation.
Description
This PR swaps our bash-based test harness for a self-documenting Magefile. mage test:default now spins up the namespaced Docker-Compose stack, waits for health checks plus a 30-second buffer, runs the acceptance tests, streams compose logs automatically when debug flags are set, and then tears everything down. A test:cover variant produces profile.cov for Codecov. The change gives us a single, reproducible command that works identically on every developer machine and in CI while eliminating flaky start-up races and manual log collection.
Motivation and Context
It simplifies running the tests locally.
How Has This Been Tested?
By both running the tests locally and also by updating the workflows on GitHub.
Documentation:
None.
Checklist:
None.
Definition of Ready