Skip to content
Snippets Groups Projects

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.

  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

Approval is optional

Merged by avatar (Aug 29, 2025 12:32am UTC)

Merge details

  • Changes merged into main with 0276803a.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading