Skip to content

Commit

Permalink
Remove ResultInconsistent for flaky e2e test
Browse files Browse the repository at this point in the history
Since later OCP has addressed the bug in the API-server https://bugzilla.redhat.com/show_bug.cgi?id=2001442, we can remove the ResultInconsistent as the accept result.
  • Loading branch information
Vincent056 committed Mar 7, 2024
1 parent d45bb1e commit 5bed715
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/e2e/serial/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,18 +326,7 @@ func TestMixProductScan(t *testing.T) {
if s.Phase != compv1alpha1.PhaseDone {
t.Fatalf("expected scan %s to be done", scan)
}
// E2e tests have been flaky because of the file_permissions_var_log_kube_audit
// rule. This is because there is a bug in the API-server in old versions of OCP[1][2].
// For now, we'll just check that the scan is not inconsistent until we upgrade
// to a version that has the fix.
// [1]https://bugzilla.redhat.com/show_bug.cgi?id=2001442
// [2]https://github.com/ComplianceAsCode/content/commit/6343659d1d25e97c66a5c1eaf8eb2ee20d1af920
if s.Result == compv1alpha1.ResultInconsistent {
// check if the scan is "ocp4-moderate-node-master"
if scan != "ocp4-moderate-node-master" {
t.Fatalf("expected scan %s not to be inconsistent", scan)
}
} else if s.Result != compv1alpha1.ResultCompliant && s.Result != compv1alpha1.ResultNonCompliant {
if s.Result != compv1alpha1.ResultCompliant && s.Result != compv1alpha1.ResultNonCompliant {
t.Fatalf("expected scan %s to be compliant or non-compliant", scan)
}
break
Expand Down

0 comments on commit 5bed715

Please sign in to comment.