mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
Due to an issue with Autogold and Bazel, we have to migrate all `autogold` tests to use the `v2`. This draft PR loses some annotations describing the test cases, but I'll update that after once I have validate that we can get those to work with Bazel. Why is this a huge PR and not a couple of smaller ones: Because this PR needed a few manual fixes, it was simpler to grind through the changes after running comby locally. I have attached the config below so you can review what I used instead. @chwarwick the code insights tests were heavily relying on the attached description on `autogold.Want` to provide context, I manually ported them by adding a new `name string` field on the test cases. Comby config I used: ``` [update-imports] match="\"github.com/hexops/autogold\"" rewrite="\"github.com/hexops/autogold/v2\"" [update-api-want] match="autogold.Want(:[desc], :[v])" rewrite="autogold.Expect(:[v])" [update-api-equal] match="autogold.Equal(:[v])" rewrite="autogold.ExpectFile(:[v])" ``` ``` $ comby -config ../autogold-comby.toml -matcher .go -exclude-dir vendor,node_modules -in-place ``` I then followed up with some manual fixes for the test cases that were making the assumption that `want.Name()` exists. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Green go tests. --------- Co-authored-by: davejrt <davetry@gmail.com> |
||
|---|---|---|
| .. | ||
| autoindex/config | ||
| lsif | ||
| pathexistence | ||
| precise | ||
| tools | ||
| upload | ||
| CODENOTIFY | ||