Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
preslavgerchev committed Feb 23, 2024
1 parent 12edfec commit cdbaa31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions policy/scan/local_scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func (s *LocalScannerSuite) TestRunIncognito_SharedQuery() {

expectedQueries := []string{
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-01"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-01"].Mrn,
}
s.ElementsMatch(expectedQueries, executedQueries)
}
Expand Down Expand Up @@ -204,6 +205,8 @@ func (s *LocalScannerSuite) TestRunIncognito_ExceptionGroups() {
expectedQueries := []string{
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].Mrn,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].Mrn,
}
s.ElementsMatch(expectedQueries, executedQueries)

Expand Down Expand Up @@ -270,6 +273,9 @@ func (s *LocalScannerSuite) TestRunIncognito_ExceptionGroups_RejectedReview() {
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/deactivate-query"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].Mrn,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/deactivate-query"].Mrn,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].Mrn,
}
s.ElementsMatch(expectedQueries, executedQueries)

Expand Down Expand Up @@ -332,6 +338,8 @@ func (s *LocalScannerSuite) TestRunIncognito_QueryExceptions() {
expectedQueries := []string{
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].Mrn,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].Mrn,
}
s.ElementsMatch(expectedQueries, executedQueries)

Expand Down Expand Up @@ -394,6 +402,8 @@ func (s *LocalScannerSuite) TestRunIncognito_QueryExceptions_MultipleGroups() {
expectedQueries := []string{
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].CodeId,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/ignored-query"].Mrn,
bundleMap.Queries["//local.cnspec.io/run/local-execution/queries/sshd-score-01"].Mrn,
}
s.ElementsMatch(expectedQueries, executedQueries)

Expand Down

0 comments on commit cdbaa31

Please sign in to comment.