Skip to content

Commit

Permalink
Fix tests that weren't running and have grown out of sync (#148)
Browse files Browse the repository at this point in the history
* Actually run tests

* Fix "CLI doc is in-sync" test

* Fix outdated SCIP snapshot tests

* Run `go mod tidy`

* Run tests with `-v` flag
  • Loading branch information
keynmol authored May 2, 2023
1 parent 360433c commit 6c9b4a6
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 166 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
- uses: ./.github/actions/asdf
with:
golang: true
- run: go test ./...
- run: go test ./... -v
3 changes: 2 additions & 1 deletion cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

func TestMain(m *testing.M) {
Reproducible = "true"
os.Exit(m.Run())
}

func TestCLIReferenceInSync(t *testing.T) {
Expand Down Expand Up @@ -91,7 +92,7 @@ func TestSCIPSnapshots(t *testing.T) {
require.Nil(t, err)
symbolFormatter := scip.DescriptorOnlyFormatter
symbolFormatter.IncludePackageName = func(name string) bool { return name != testName }
snapshots, err := testutil.FormatSnapshots(index, "#", symbolFormatter, "")
snapshots, err := testutil.FormatSnapshots(index, "#", symbolFormatter, inputDirectory)
require.Nil(t, err)
if debugSnapshotAbspaths != nil && *debugSnapshotAbspaths {
inputDirAbsPath, err := filepath.Abs(inputDirectory)
Expand Down
Loading

0 comments on commit 6c9b4a6

Please sign in to comment.