Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AST-84346 #1048

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
28 changes: 28 additions & 0 deletions test/integration/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,34 @@ func TestCreateScan_WithTypeScs_Success(t *testing.T) {
executeCmdWithTimeOutNilAssertion(t, "SCS scan must complete successfully", 4*time.Minute, args...)
}

func TestCreateScan_WithTypeScsAndOnlyScorecard_Success(t *testing.T) {
_, projectName := getRootProject(t)

args := []string{
"scan", "create",
flag(params.ProjectName), projectName,
flag(params.SourcesFlag), Zip,
flag(params.ScanTypes), "scs",
flag(params.BranchFlag), "main",
flag(params.SCSRepoURLFlag), scsRepoURL,
flag(params.SCSRepoTokenFlag), scsRepoToken,
flag(params.SCSEnginesFlag), commands.ScsScoreCardType,
flag(params.TargetFormatFlag), strings.Join(
[]string{
printer.FormatJSON,
printer.FormatSarif,
printer.FormatSonar,
printer.FormatSummaryConsole,
printer.FormatSummaryJSON,
printer.FormatPDF,
printer.FormatSummaryMarkdown,
}, ",",
),
}

executeCmdWithTimeOutNilAssertion(t, "SCS scan with only Scorecard must complete successfully", 4*time.Minute, args...)
}

func TestCreateScan_WithNoScanTypesAndScsFlagsNotPresent_SuccessAndScsScanned(t *testing.T) {
_, projectName := getRootProject(t)

Expand Down
Loading