Split API Integration Tests Into Separate Packages
Context
We have extensive API integration tests for the API backed by the database. CI jobs running this test can take up to 15 minutes to complete.
We cannot parallelize executions of the tests as each job environment contains a single database, which must be restored to a pristine state after each test.
Problem
As we continue to provide more test coverage, and as we expand the API via the GitLab V1 API, the runtime of these CI jobs will only increase, slowing iteration. More packages allow for more jobs for greater parallelism.
Some of these tests are occasionally flake, and spreading out these tests into multiple jobs allows us to retry flakey tests in a more targeted manner.
The test files themselves are massive and poorly organized. Splitting them up across multiple files should ease navigation and reduce strain on our IDEs.
Solution
This staggered approach should reduce the amount of changes any single MR generates. Attempting this in a single MR would produce a diff of several thousand lines.
-
Move API integration tests into single separate package out of the handlers directory -
Move utils into an internal package -
Move helpers that v2 conformance tests rely on into utils package -
Move v2 conformance tests into separate package -
Move helpers that GitLab v1 tests rely on into utils package -
Move GitLab v1 tests into a separate package -
Move helpers db fault tolerance tests rely on into utils package -
Move db fault tolerance tests into a separate package -
Move online gc tests into a separate package -
Move helpers remaining v2 tests rely on into utils package -
Move remaining v2 tests into a separate package