sourcegraph/dev/codeintel-qa
Thorsten Ball 8d3e231322
golangci-lint: enable unparam linter (#31856)
Team work makes the linter dream work.

Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com>
2022-02-28 15:31:44 +01:00
..
cmd golangci-lint: enable unparam linter (#31856) 2022-02-28 15:31:44 +01:00
internal codeintel-qa: Rewrite precise-code-intel-tester (#25412) 2021-10-04 09:46:24 -05:00
scripts migrations: Small refactor to runner package (#30428) 2022-01-31 14:47:48 -07:00
.gitignore codeintel-qa: Rewrite precise-code-intel-tester (#25412) 2021-10-04 09:46:24 -05:00
CODENOTIFY codeintel-qa: Rewrite precise-code-intel-tester (#25412) 2021-10-04 09:46:24 -05:00
README.md codeintel-qa: Rewrite precise-code-intel-tester (#25412) 2021-10-04 09:46:24 -05:00

Precise code intel tester

This package provides integration and load testing utilities for precise code intel services.

Prerequisites

Ensure that the following tools are available on your path:

Set:

SOURCEGRAPH_BASE_URL=http://localhost:3080
SOURCEGRAPH_SUDO_TOKEN=<YOUR SOURCEGRAPH API ACCESS TOKEN>

Testing

  1. Ensure these repositories exist on your instance (in Site Admin -> Manage repositories -> GitHub):
  "repos": [
    "sourcegraph-testing/etcd",
    "sourcegraph-testing/tidb",
    "sourcegraph-testing/titan",
    "sourcegraph-testing/zap"
  ],
  1. Download the test indexes by running the following command:
./scripts/download.sh

Alternatively, generate them by running the following command (this takes much longer):

./scripts/clone-and-index.sh

Upload the indexes to your the target instance by running the following command:

go build ./cmd/upload && ./upload

Then run test queries against the target instance by running the following command:

go build ./cmd/query && ./query

Refreshing indexes

If there is a change to an indexer that needs to be tested, the indexes can be regenerated and uploaded to gcloud for future test runs.

Generate indexes by running the following command:

./scripts/clone-and-index.sh

Upload the generated indexes by running the following command:

./scripts/upload.sh

Or if you just want to test an indexer change locally, you can:

rm -rf testdata/indexes/

Then rerun the testing steps described above (starting at clone-and-index.sh)