Skip to content

Commit

Permalink
cmd/govulncheck: skip TestCommand in short mode
Browse files Browse the repository at this point in the history
Short tests aren't expected to access the internet, even if it happens
to be just proxy.golang.org. Caught by the new no-network check in LUCI.

Change-Id: I233158cdda99eca011390d1375310fde82eedb19
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/510676
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
dmitshur authored and gopherbot committed Jul 18, 2023
1 parent f69de67 commit 1568f33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/govulncheck/main_command_118_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func init() {
}

func TestCommand(t *testing.T) {
if testing.Short() {
t.Skip("skipping test that uses internet in short mode")
}

testDir, err := os.Getwd()
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 1568f33

Please sign in to comment.