Skip to content

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:

  1. 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 with GL_IGNORE_WARNINGS.
  2. 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.

Screenshots (strongly suggested)

20210324_fe_integration_warn_on_gql_schema

Merge request reports

Loading