Skip to content

insights: Add backend integration tests

Administrator requested to merge backend-integration/insights into main

Created by: CristinaBirkel

Closes https://github.com/sourcegraph/sourcegraph/issues/32085

Description

This PR does a few things, all in service of being able to test the Code Insights GraphQL API as a part of the backend integration tests.

  1. Adds the codeinsights-db to the sourcegraph/server single docker deployment.
  2. Adds a check for an environment variable, ALLOW_SINGLE_DOCKER_CODE_INSIGHTS, which enables code insights in a single docker deployment when set to TRUE. This gets set when running backend integration tests in CI, but will be disabled by default.
  3. Adds in a smoke test for the insights api to make sure it can connect.

Test plan

It's all a test! :)

I did pull down and run the image locally though, for example:

docker run -e ALLOW_SINGLE_DOCKER_CODE_INSIGHTS=true --publish 7080:7080 --rm us.gcr.io/sourcegraph-dev/server:d5e9e62bdec49fb74ecb6c8851902d0008e31833_140630_candidate

And verified that it worked as expected. I could create insights and run the tests.

Merge request reports

Loading