Skip to content

Commit

Permalink
fix(e2e): ensure all subscriptions are deleted in replacing test
Browse files Browse the repository at this point in the history
  • Loading branch information
njhale committed Jan 29, 2019
1 parent 422b134 commit 316612a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/e2e/installplan_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func TestCreateInstallPlanWithPreExistingCRDOwners(t *testing.T) {
fetchedInstallPlan, err := fetchInstallPlan(t, crc, installPlanName, completeOrFailedFunc)
require.NoError(t, err)
t.Logf("Install plan %s fetched with status %s", fetchedInstallPlan.GetName(), fetchedInstallPlan.Status.Phase)
require.True(t, completeOrFailedFunc(fetchedInstallPlan))
require.Equal(t, v1alpha1.InstallPlanPhaseComplete, fetchedInstallPlan.Status.Phase)

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

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

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

// time.Sleep(5 * time.Minute)
subscription, err = fetchSubscription(t, crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
require.NoError(t, err)
require.NotNil(t, subscription)
Expand Down

0 comments on commit 316612a

Please sign in to comment.