Skip to content

Commit

Permalink
fix sort paths related to the e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturRibeiro-CX committed Jan 9, 2024
1 parent 8db83e6 commit 4abe51d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions e2e/testcases/e2e-cli-069_ignore_experimental_query.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package testcases

// E2E-CLI-069 - KICS scan and ignore experimental queries
// should perform the scan successfully and return exit code 40
import (
"sort"
)

// E2E-CLI-070 - KICS scan and not ignore experimental queries
// should perform the scan successfully and return exit code 40 and 50
func init() { //nolint
samplePath := "/path/test/fixtures/experimental_test/sample"
queriesPath := "/path/test/fixtures/experimental_test/queries"
Expand All @@ -14,22 +14,21 @@ func init() { //nolint
sort.Strings(paths)

testSample := TestCase{
Name: "should perform a valid scan and not ignore the experimental queries [E2E-CLI-070]",
Name: "should perform a valid scan and ignore the experimental queries [E2E-CLI-069]",
Args: args{
Args: []cmdArgs{
[]string{"scan", "-o", "/path/e2e/output", "--output-name", "E2E_CLI_070_RESULT",
"-p", "\"" + paths[0] + "\"", "-q", "\"" + paths[1] + "\"",
"--experimental-queries",
[]string{"scan", "-o", "/path/e2e/output", "--output-name", "E2E_CLI_069_RESULT",
"-p", "\"" + paths[1] + "\"", "-q", "\"" + paths[0] + "\"",
},
},
ExpectedResult: []ResultsValidation{
{
ResultsFile: "E2E_CLI_070_RESULT",
ResultsFile: "E2E_CLI_069_RESULT",
ResultsFormats: []string{"json"},
},
},
},
WantStatus: []int{50},
WantStatus: []int{40},
}

Tests = append(Tests, testSample)
Expand Down
2 changes: 1 addition & 1 deletion e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func init() { //nolint
Args: args{
Args: []cmdArgs{
[]string{"scan", "-o", "/path/e2e/output", "--output-name", "E2E_CLI_070_RESULT",
"-p", "\"" + paths[0] + "\"", "-q", "\"" + paths[1] + "\"",
"-p", "\"" + paths[1] + "\"", "-q", "\"" + paths[0] + "\"",
"--experimental-queries",
},
},
Expand Down

0 comments on commit 4abe51d

Please sign in to comment.