diff --git a/e2e/testcases/e2e-cli-069_ignore_experimental_query.go b/e2e/testcases/e2e-cli-069_ignore_experimental_query.go index b930126d359..908fc6bec38 100644 --- a/e2e/testcases/e2e-cli-069_ignore_experimental_query.go +++ b/e2e/testcases/e2e-cli-069_ignore_experimental_query.go @@ -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{ diff --git a/e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go b/e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go index 1dd2bc64d4a..e12dc88a121 100644 --- a/e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go +++ b/e2e/testcases/e2e-cli-070_not_ignore_experimental_query.go @@ -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", }, },