Repository navigation
feat: add make targets for the Gitlab-backed test loop - #668
Draft
feiyunzhou wants to merge 1 commit into
Draft
feiyunzhou wants to merge 1 commit into
feiyunzhou wants to merge 1 commit into
Conversation
The repository already ships the Gitlab instance that CI tests against, but CONTRIBUTING.md pointed at Gitlab's own install docs instead and never mentioned docker-compose.tests.yml. Wire the compose file and the FOXOPS_TESTS_GITLAB_* variables into make targets so a contributor can run the end-to-end tests against a real Gitlab in one command, and say in CONTRIBUTING.md that those tests cover the path down to the Gitlab API without an image build or a deployment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY?
Checking a hoster or change-service fix against a real Gitlab currently looks
like a research task.
CONTRIBUTING.mdsends you to Gitlab's own install docs,even though this repository already starts a Gitlab instance for its CI in
docker-compose.tests.yml, and the end-to-end tests undertests/e2e/alreadyrun the foxops app in-process against it. That is the quickest way to cover a
change all the way down to the Gitlab API, and nothing pointed at it.
WHAT?
gitlab-up,gitlab-downandtest-gitlabmake targets that start thebundled Gitlab and run the suite against it.
test-gitlabacceptsPYTEST_ARGS, so a subset can be iterated on.state that the end-to-end tests reach the Gitlab API without an image build or
a deployment.
gitlab/gitlab-ceis published for amd64 only, and that underemulation it reports itself healthy while answering part of the suite with
502 Bad Gateway.ADDITIONAL NOTES
FOXOPS_TESTS_GITLAB_USERNAME/_PASSWORDwas already supported by the testsettings and is what CI uses, but it was undocumented. The make target uses it so
that the bundled instance needs no access token.
FOXOPS_TESTS_GITLAB_ROOT_GROUP_IDstays optional; without it the temporaryprojects land in the authenticated user's namespace.
Ran the end-to-end tests through
make test-gitlabagainst the bundled instance,and through the environment variables against a remote Gitlab. Both were on an
arm64 host, where the emulation caveat above is what I ran into.