sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.53k stars 261 forks source link

Agent: move enterprise integration tests to separate files #5127

Closed olafurpg closed 1 month ago

olafurpg commented 1 month ago

Previously, the enterprise tests lived in the monolithic index.test.ts file. This made it unnecessarily difficult to test the enterprise clients in isolation from the dotcom client. For example, in the PR https://github.com/sourcegraph/cody/pull/4861 we want to be able to reliably test that enterprise clients don't send network requests outside of sourcegraph. If the dotcom client downloads symf then the enterprise client won't send network requests to download it because it's cached.

Now, the enterprise clients live in separate test files making it easier to only run those tests in isolation giving us better confidence about the asserted behavior.

Test plan

This PR is purely refactoring tests.

Green CI. Notice that there is no diff in the HTTP recordings.

Changelog