Skip to content

Commit

Permalink
test: use skip instead of a condition so that go-snaps knows snapsh…
Browse files Browse the repository at this point in the history
…ots are not obsolete (#1594)

Currently, because we're not using `snaps.Skip` the Windows and MacOS
test suites report obsolete snapshots that should be cleaned up
  • Loading branch information
G-Rath authored Feb 9, 2025
1 parent aeb98b1 commit 0c598f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/osv-scanner/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,11 @@ func TestRun_Docker(t *testing.T) {
t.Parallel()

// Only test on linux, and mac/windows CI/CD does not come with docker preinstalled
if runtime.GOOS == "linux" {
testCli(t, tt)
if runtime.GOOS != "linux" {
testutility.Skip(t, "Skipping Docker-based test as only Linux has Docker installed in CI")
}

testCli(t, tt)
})
}
}
Expand Down

0 comments on commit 0c598f8

Please sign in to comment.