Skip to content

Commit 2985c9c

Browse files
authored
test: have mcp integration tests use osv-scanner-test.toml (#2585)
This matches what we're doing in our other tests, and means that tools like scorecard won't ding us for the vulnerability in this test data
1 parent ae08401 commit 2985c9c

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

cmd/osv-scanner/mcp/integration_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,16 @@ func buildTestBinary(t *testing.T) string {
121121
}
122122

123123
// We use the full package path to ensure we build the correct main package.
124-
cmdBuild := exec.CommandContext(context.Background(), "go", "build", "-o", binPath, "github.com/google/osv-scanner/v2/cmd/osv-scanner")
124+
cmdBuild := exec.CommandContext(
125+
context.Background(),
126+
"go",
127+
"build",
128+
"-ldflags",
129+
"-X 'github.com/google/osv-scanner/v2/internal/config.OSVScannerConfigName=osv-scanner-test.toml'",
130+
"-o",
131+
binPath,
132+
"github.com/google/osv-scanner/v2/cmd/osv-scanner",
133+
)
125134
cmdBuild.Stdout = os.Stdout
126135
cmdBuild.Stderr = os.Stderr
127136
if err := cmdBuild.Run(); err != nil {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[PackageOverrides]]
2+
ignore = true

0 commit comments

Comments
 (0)