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

fix(test): sort paths related to the e2e #6848

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading