Skip to content
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a908502
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
6908ff8
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
b28d35f
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
905aa57
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
457f57e
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
4be4f14
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 12, 2022
32d3d5f
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
dae1c5d
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
e8d8f14
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
ad45dbc
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
461e2d0
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
3608abe
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
19b1a4e
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 13, 2022
a80ad7a
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 14, 2022
e1efb2e
Merge branch 'main' into feature/AST-11603_CLI_add_ssh_key_project_cr…
cx-hugo-machado Apr 18, 2022
fbf8f82
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 18, 2022
d24b651
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 18, 2022
9ed0629
AST-11621 - CLI | Handle file filters when source is zip file
cx-hugo-machado Apr 19, 2022
7800854
AST-11621 - CLI | Handle file filters when source is zip file
cx-hugo-machado Apr 19, 2022
c1ba9d2
AST-11602 - CLI | Add SSH key to scan create command
cx-hugo-machado Apr 19, 2022
f8d480c
Merge branch 'main' into feature/AST-11602_CLI_add_ssh_key_scan_create
cx-hugo-machado Apr 19, 2022
fec2c87
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 20, 2022
5811714
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 20, 2022
90877cb
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 20, 2022
2e55b2a
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 20, 2022
774fdd4
Merge branch 'feature/AST-11602_CLI_add_ssh_key_scan_create' into fea…
cx-hugo-machado Apr 20, 2022
acafc8f
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 20, 2022
b46aa95
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 27, 2022
922c56d
Merge branch 'main' into feature/AST-11603_CLI_add_ssh_key_project_cr…
cx-hugo-machado Apr 28, 2022
5230d26
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 28, 2022
54b1149
AST-11603 - CLI | Add SSH key to project create command
cx-hugo-machado Apr 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions internal/commands/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,27 +231,6 @@ func TestScanWorkflowMissingID(t *testing.T) {
assert.Error(t, err, "Please provide a scan ID", err.Error())
}

func TestScanWorkFlowWithSastFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "sastFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--sast-filter", "!*.go"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}

func TestScanWorkFlowWithKicsFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "kicsFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--kics-filter", "!Dockerfile"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}

func TestScanWorkFlowWithScaFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "scaFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--sca-filter", "!jQuery"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}

func TestCreateScanMissingSSHValue(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "MOCK", "-s", "../..", "-b", "dummy_branch"}

Expand Down Expand Up @@ -299,3 +278,24 @@ func TestCreateScanWithSSHKey(t *testing.T) {

execCmdNilAssertion(t, append(baseArgs, "-s", dummySSHRepo, "--ssh-key", "data/sources.zip")...)
}

func TestScanWorkFlowWithSastFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "sastFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--sast-filter", "!*.go"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}

func TestScanWorkFlowWithKicsFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "kicsFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--kics-filter", "!Dockerfile"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}

func TestScanWorkFlowWithScaFilter(t *testing.T) {
baseArgs := []string{"scan", "create", "--project-name", "scaFilterMock", "-b", "dummy_branch", "-s", dummyRepo, "--sca-filter", "!jQuery"}
cmd := createASTTestCommand()
err := executeTestCommand(cmd, baseArgs...)
assert.NilError(t, err)
}