Skip to content
Merged
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
21 changes: 10 additions & 11 deletions tests/e2e/parallel/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2431,24 +2431,23 @@ func TestScheduledSuiteNoStorage(t *testing.T) {
}
defer f.Client.Delete(context.TODO(), testSuite)

// Ensure that all the scans in the suite have finished and are marked as Done.
// Accept any result since this test validates storage behavior, not compliance outcome.
err = f.WaitForSuiteScansStatusAnyResult(f.OperatorNamespace, suiteName, compv1alpha1.PhaseDone,
compv1alpha1.ResultCompliant, compv1alpha1.ResultNonCompliant, compv1alpha1.ResultError)
if err != nil {
t.Fatal(err)
}

pvcList := &corev1.PersistentVolumeClaimList{}
err = f.Client.List(context.TODO(), pvcList, client.InNamespace(f.OperatorNamespace), client.MatchingLabels(map[string]string{
compv1alpha1.ComplianceScanLabel: workerScanName,
}))
if err != nil {
t.Fatal(err)
}
if len(pvcList.Items) > 0 {
for _, pvc := range pvcList.Items {
t.Fatalf("Found unexpected PVC %s", pvc.Name)
}
t.Fatal("Expected not to find PVC associated with the scan.")
}

// Ensure that all the scans in the suite have finished and are marked as Done
err = f.WaitForSuiteScansStatus(f.OperatorNamespace, suiteName, compv1alpha1.PhaseDone, compv1alpha1.ResultCompliant)
if err != nil {
t.Fatal(err)
for _, pvc := range pvcList.Items {
t.Fatalf("Found unexpected PVC %s", pvc.Name)
}
}

Expand Down
Loading