insights: Add backend integration tests
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.
- Adds the
codeinsights-db
to thesourcegraph/server
single docker deployment. - Adds a check for an environment variable,
ALLOW_SINGLE_DOCKER_CODE_INSIGHTS
, which enables code insights in a single docker deployment when set toTRUE
. This gets set when running backend integration tests in CI, but will be disabled by default. - 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.