This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Conversation
This was referenced May 20, 2024
This was referenced May 20, 2024
Member
Author
eseliger
commented
May 20, 2024
dev/rockskipintegration/main_test.go
Outdated
Member
Author
There was a problem hiding this comment.
I used the internal code for this, but it would be nice if the integration test could also spawn a symbols server like we do for gitserver here, and solely test via the external facing APIs.
69bb081 to
99dfa7d
Compare
mmanela
reviewed
May 21, 2024
7f51c08 to
858cb3d
Compare
99dfa7d to
c58423b
Compare
858cb3d to
44b9087
Compare
Base automatically changed from
es/05-17-gitserverdeprecateexecandremovelocalgit
to
main
May 21, 2024 16:19
c58423b to
ce3329a
Compare
Strum355
reviewed
May 27, 2024
ce3329a to
fe0553d
Compare
This PR tinkers a bit with building a test helper to run integration tests that are still ~lightweight against a real gitserver. The caller can either clone a real repo to disk / embed it in the git repo, or can create a small repo on the fly, and then get a running gitserver gRPC server that returns all the data required. These tests should only exist outside of cmd/ and internal/, as there is a big potential to do cross-cmd imports from here, which can cause bad coupling. But for just these tests, that should be fine. The most trivial rockskip indexing job that I put in here to POC this runs in 6.3s, including all setup and teardown. That seems very reasonable to me. Test plan: The POC test passes.
fe0553d to
6b84f32
Compare
keegancsmith
approved these changes
Jun 7, 2024
Member
keegancsmith
left a comment
There was a problem hiding this comment.
Rad!
❯ go test -count=1 ./dev/rockskipintegration/
ok github.com/sourcegraph/sourcegraph/dev/rockskipintegration 0.865s
My desktop linux machine likely has a much better FS without our soc2 monitoring :P
Contributor
0.8s vs 6s....thanks jamf... |
Member
Author
still quite good for an integration test, but man 😢 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR tinkers a bit with building a test helper to run integration tests that are still ~lightweight against a real gitserver.
The caller can either clone a real repo to disk / embed it in the git repo, or can create a small repo on the fly, and then get a running gitserver gRPC server that returns all the data required.
These tests should only exist outside of cmd/ and internal/, as there is a big potential to do cross-cmd imports from here, which can cause bad coupling. But for just these tests, that should be fine.
The most trivial rockskip indexing job that I put in here to POC this runs in 6.3s, including all setup and teardown. That seems very reasonable to me.
Test plan:
The POC test passes.