-
Notifications
You must be signed in to change notification settings - Fork 452
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
build go binary with coverage integration tests #6684
Comments
IMO we should start prioritizing this. After #7388 it's really a pain to test zitadel locally. Because Go uses a build cache under On (some?) linux distributions I hope that can be greatly reduced if we build the server binary once for the integration tests, so that only the client objects have to be build for each package. As a workaround I moved |
@eliobischof or @stebenz can you estimate this issue? |
@stebenz will have a look about what exactly we should do. |
@muhlemmer @eliobischof How to continue, I would split integration tests into binary for a singular server and tests, which call the server through clients.
|
That's what I wrote in the acceptance criteria:
I didn't specify the exact method, because I don't know which works best in the pipeline. (bash, zitadel &
zitadel_pid=$!
go test ....
kill -s SIGTERM $zitadel_pid From my perspective that's up to the implementer in the end.
In principle we should be able to create service users and obtain credentials over the API. We can still store them in the same map, so they can be cached for multiple uses. We can then get rid of the direct command and query calls. |
As a developer I want a fast pipeline.
Integrations tests are basically API calls from a client, to a running zitadel server. Currently each of the integration tests starts it's own zitadel server, through the
./cmd
package. For each package time is lost on starting and stopping zitadel. Also, if the tests are run in paralel, they seem to choke as multiple servers are trying to start-up and trying to obtain spooler related locks. Therefore we currently run the tests sequential.Starting from Go 1.20, it is possible to build a binary with coverage profiling support. This way we could build a zitadel server binary with coverage support, launch it during pipeline initialization and then run the package tests in paralel. The coverage report can then still be obtained and uploaded to codecov.
Acceptance criteria
SIGTERM
the binary when the tests are completed*_integration_test.go
files:TestMain
when in piplineThe text was updated successfully, but these errors were encountered: