Skip to content

Commit b6af818

Browse files
committed
all: remove test that runs govulncheck on govulncheck
The only interesting vulnerabilities this test can find are stdlib ones. We cannot really do much about those. On the other hand, whoever is developing this module on a go version that is not the latest patch or top will see a failure. This is annoying so we remove the test. Change-Id: I3236393354565eb9d682075948330b0612434606 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/589235 Reviewed-by: Maceo Thompson <maceothompson@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent c68e251 commit b6af818

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

all_test.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ package main
99

1010
import (
1111
"bufio"
12-
"bytes"
13-
"context"
1412
"errors"
1513
"io/fs"
1614
"os"
@@ -21,7 +19,6 @@ import (
2119

2220
"golang.org/x/mod/modfile"
2321
"golang.org/x/vuln/internal/testenv"
24-
"golang.org/x/vuln/scan"
2522
)
2623

2724
// excluded contains the set of modules that x/vuln should not depend on.
@@ -55,33 +52,6 @@ func TestDependencies(t *testing.T) {
5552
}
5653
}
5754

58-
func TestGovulncheck(t *testing.T) {
59-
skipIfShort(t)
60-
testenv.NeedsGoBuild(t)
61-
62-
var o string
63-
out := bytes.NewBufferString(o)
64-
ctx := context.Background()
65-
66-
cmd := scan.Command(ctx, "./...")
67-
cmd.Stdout = out
68-
cmd.Stderr = out
69-
err := cmd.Start()
70-
if err == nil {
71-
err = cmd.Wait()
72-
}
73-
74-
t.Logf("govulncheck finished with std out/err:\n%s", out.String())
75-
switch err := err.(type) {
76-
case nil:
77-
t.Log("govulncheck: no vulnerabilities detected")
78-
case interface{ ExitCode() int }:
79-
t.Errorf("govulncheck: unexpected exit code %d and error %v", err.ExitCode(), err)
80-
default:
81-
t.Errorf("govulncheck: abruptly failed with error %v", err)
82-
}
83-
}
84-
8555
func TestVet(t *testing.T) {
8656
rungo(t, "vet", "-all", "./...")
8757
}

0 commit comments

Comments
 (0)