Skip to content

Commit 316612a

Browse files
committed
fix(e2e): ensure all subscriptions are deleted in replacing test
1 parent 422b134 commit 316612a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/e2e/installplan_e2e_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ func TestCreateInstallPlanWithPreExistingCRDOwners(t *testing.T) {
532532
fetchedInstallPlan, err := fetchInstallPlan(t, crc, installPlanName, completeOrFailedFunc)
533533
require.NoError(t, err)
534534
t.Logf("Install plan %s fetched with status %s", fetchedInstallPlan.GetName(), fetchedInstallPlan.Status.Phase)
535-
require.True(t, completeOrFailedFunc(fetchedInstallPlan))
535+
require.Equal(t, v1alpha1.InstallPlanPhaseComplete, fetchedInstallPlan.Status.Phase)
536536

537537
// Ensure that the desired resources have been created
538538
expectedSteps := map[registry.ResourceKey]struct{}{
@@ -561,13 +561,12 @@ func TestCreateInstallPlanWithPreExistingCRDOwners(t *testing.T) {
561561
require.Equal(t, 0, len(expectedSteps), "Actual resource steps do not match expected")
562562

563563
// Update the subscription resource to point to the beta CSV
564-
err = crc.OperatorsV1alpha1().Subscriptions(testNamespace).Delete(subscriptionName, metav1.NewDeleteOptions(0))
564+
err = crc.OperatorsV1alpha1().Subscriptions(testNamespace).DeleteCollection(metav1.NewDeleteOptions(0), metav1.ListOptions{})
565565
require.NoError(t, err)
566566

567567
// existing cleanup should remove this
568568
createSubscriptionForCatalog(t, crc, testNamespace, subscriptionName, mainCatalogSourceName, mainPackageName, betaChannel, v1alpha1.ApprovalAutomatic)
569569

570-
// time.Sleep(5 * time.Minute)
571570
subscription, err = fetchSubscription(t, crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
572571
require.NoError(t, err)
573572
require.NotNil(t, subscription)

0 commit comments

Comments
 (0)