Add gitlab_schema.gql warning in integration spec
What does this MR do?
Previously, gitlab_schema.graphql
used to be committed into source control. Now it is dynamically generated in CI.
In the FE integration spec environment, a missing gitlab_schema.graphql
can lead to unrelated errors since the mock_server
uses it while building the /graphql
route.
This MR does two things:
- Adds a warning on
jest.integration.config.js
that checks if the file exists. By default, it will blow up if the file does not exist, but this can be overwritten withGL_IGNORE_WARNINGS
. - Defers reading
gitlab_schema.graphql
until it's actually needed. This means the mock server will work for tests that don't use it at all.