Skip to content

Commit

Permalink
Merge pull request #6848 from Checkmarx/sort-e2e-fix
Browse files Browse the repository at this point in the history
fix(test): sort paths related to the e2e
  • Loading branch information
gabriel-cx authored Jan 9, 2024
2 parents b1a770d + 4abe51d commit 52d19a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion e2e/testcases/e2e-cli-069_ignore_experimental_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ package testcases

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

func init() { //nolint
samplePath := "/path/test/fixtures/experimental_test/sample"
queriesPath := "/path/test/fixtures/experimental_test/queries"

paths := []string{samplePath, queriesPath}
sort.Strings(paths)

testSample := TestCase{
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_069_RESULT",
"-p", "\"/path/test/fixtures/experimental_test/sample\"", "-q", "\"/path/test/fixtures/experimental_test/queries\"",
"-p", "\"" + paths[1] + "\"", "-q", "\"" + paths[0] + "\"",
},
},
ExpectedResult: []ResultsValidation{
Expand Down
12 changes: 11 additions & 1 deletion e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
package testcases

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"

paths := []string{samplePath, queriesPath}
sort.Strings(paths)

testSample := TestCase{
Name: "should perform a valid scan and not ignore the experimental queries [E2E-CLI-070]",
Args: args{
Args: []cmdArgs{
[]string{"scan", "-o", "/path/e2e/output", "--output-name", "E2E_CLI_070_RESULT",
"-p", "\"/path/test/fixtures/experimental_test/sample\"", "-q", "\"/path/test/fixtures/experimental_test/queries\"",
"-p", "\"" + paths[1] + "\"", "-q", "\"" + paths[0] + "\"",
"--experimental-queries",
},
},
Expand Down

0 comments on commit 52d19a6

Please sign in to comment.