sourcegraph/dev/gqltest
Camden Cheek 06d172448d
Search: expose path matches on FileMatch (#63396)
This just exposes the matched path ranges on our FileMatch GraphQL
object. We already had this information, just did not expose it via the
API.
2024-06-26 08:23:28 -06:00
..
access_token_test.go Implement expiry for access tokens (#59565) 2024-01-18 18:54:07 -05:00
bitbucket_projects_perms_sync_test.go dev/gqltest: Unskip bitbucket project perms tests (#54477) 2023-07-04 11:24:25 +02:00
BUILD.bazel Symbols: new backend integration test (#62686) 2024-05-15 17:32:54 +01:00
code_insights_test.go Unskip flaky sub-repo permissions tests (#57854) 2023-11-06 11:07:35 +00:00
CODENOTIFY CODENOTIFY: subscribe changes for joe (#15141) 2020-10-29 15:31:53 +08:00
compute_test.go chore: Simplify extsvc config in integration tests (#62755) 2024-05-20 08:09:52 -07:00
external_service_test.go Unskip flaky sub-repo permissions tests (#57854) 2023-11-06 11:07:35 +00:00
feature_flag_test.go Unskip flaky sub-repo permissions tests (#57854) 2023-11-06 11:07:35 +00:00
main_test.go chore: Remove client construction from SignUp/In funcs (#62789) 2024-05-21 15:18:58 +02:00
organization_test.go chore: Factor out logic for modifying site config (#62768) 2024-05-21 15:16:48 +02:00
README.md Add Cody Pro REST API client library (#62715) 2024-05-17 14:58:10 -07:00
repository_test.go chore: Simplify extsvc config in integration tests (#62755) 2024-05-20 08:09:52 -07:00
search_aggregations_test.go chore: Simplify extsvc config in integration tests (#62755) 2024-05-20 08:09:52 -07:00
search_test.go Search: expose path matches on FileMatch (#63396) 2024-06-26 08:23:28 -06:00
site_config_test.go ci: fix test issues on main (#62823) 2024-05-21 14:31:38 +00:00
sub_repo_permissions_test.go chore: Remove client construction from SignUp/In funcs (#62789) 2024-05-21 15:18:58 +02:00
symbol_search_test.go chore: Simplify extsvc config in integration tests (#62755) 2024-05-20 08:09:52 -07:00

GraphQL integration tests

This directory contains API-based integration tests in the form of standard Go tests. It is called gqltest since most of our API is GraphQL. However, the test suite has been extended to test other endpoints such as streaming search.

To run these tests against a local change, use sg to spin up a job in Buildkite:

sg ci bazel test //testing:backend_integration_test

You can also push a branch to run integration tests, since they're always run by CI on branch pushes.

How to run tests locally

You can also run integration tests locally. Note: this is not a well-trodden path, and it's recommended to use CI instead.

Steps:

  1. Request "CI Secrets Read Access" in Entitle
  2. Run sg test bazel-backend-integration

How to add new tests

Adding new tests to this test suite is as easy as adding a Go test, here are some general rules to follow:

  • Use gqltest- prefix for entity name, and be as specific as possible for easier debugging, e.g. gqltest-org-user-1.
  • Restore the previous state regardless of failures, including:
    • Delete new users created during the test.
    • Delete external services created during the test.
    • Although, sometimes you would not want to delete an entity so you could login and inspect the failure state.