Skip to content

Commit

Permalink
Fix OperatorAutomountTokens reversed result (#2381)
Browse files Browse the repository at this point in the history
* Fix OperatorAutomountTokens reversed result

* fix expected results
  • Loading branch information
edcdavid committed Aug 28, 2024
1 parent 8fc3751 commit 40a76a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion expected_results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ testCases:
- observability-crd-status
- observability-pod-disruption-budget
- observability-termination-policy
- operator-automount-tokens
- operator-crd-openapi-schema
- operator-crd-versioning
- operator-install-source
Expand All @@ -73,6 +72,7 @@ testCases:
- affiliated-certification-container-is-certified-digest # test container image is not certified
- operator-read-only-file-system
- operator-run-as-non-root
- operator-automount-tokens
skip:
- access-control-sys-ptrace-capability
- affiliated-certification-helm-version
Expand Down
2 changes: 1 addition & 1 deletion tests/operator/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func testOperatorPodsAutomountTokens(check *checksdb.Check, env *provider.TestEn
// Evaluate the pod's automount service tokens and any attached service accounts
client := clientsholder.GetClientsHolder()
podPassed, newMsg := rbac.EvaluateAutomountTokens(client.K8sClient.CoreV1(), pod)
if !podPassed {
if podPassed {
check.LogInfo("Pod %q in namespace %q has automount service account token set to false", pod.Name, pod.Namespace)
compliantObjects = append(compliantObjects, testhelper.NewPodReportObject(pod.Namespace, pod.Name, "Pod has automount service account token set to false", true))
} else {
Expand Down

0 comments on commit 40a76a8

Please sign in to comment.