Skip to content

Commit 0afb631

Browse files
added-ut-sbom-scan
1 parent 9bcd4d9 commit 0afb631

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/commands/scan_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,3 +2415,12 @@ func Test_isValidJSONOrXML(t *testing.T) {
24152415
}
24162416
}
24172417
}
2418+
2419+
func Test_CreateScanWithSbomFlag(t *testing.T) {
2420+
err := execCmdNotNilAssertion(
2421+
t,
2422+
"scan", "create", "--project-name", "newProject", "-s", "data/sbom.json", "--branch", "dummy_branch", "--sbom-only",
2423+
)
2424+
2425+
assert.ErrorContains(t, err, "Failed creating a scan: Input in bad format: failed to read file:")
2426+
}

0 commit comments

Comments
 (0)