diff --git a/test/e2e/installplan_e2e_test.go b/test/e2e/installplan_e2e_test.go index 89137ffcd2..d8931ea370 100644 --- a/test/e2e/installplan_e2e_test.go +++ b/test/e2e/installplan_e2e_test.go @@ -559,8 +559,8 @@ func TestInstallPlanWithCRDSchemaChange(t *testing.T) { // Create the catalog source mainCatalogSourceName := genName("mock-ocs-main-") - // catalog source clean up is called explicitly below _, cleanupCatalogSource := createInternalCatalogSource(t, c, crc, mainCatalogSourceName, testNamespace, mainManifests, []apiextensions.CustomResourceDefinition{mainCRD}, []v1alpha1.ClusterServiceVersion{mainStableCSV, mainBetaCSV}) + defer cleanupCatalogSource() // Attempt to get the catalog source before creating install plan(s) _, err := fetchCatalogSource(t, crc, mainCatalogSourceName, testNamespace, catalogSourceRegistryPodSynced) @@ -606,7 +606,6 @@ func TestInstallPlanWithCRDSchemaChange(t *testing.T) { // Should have removed every matching step require.Equal(t, 0, len(expectedSteps), "Actual resource steps do not match expected") - cleanupCatalogSource() // CRD schema change var min float64 = 2 var max float64 = 256 @@ -629,8 +628,8 @@ func TestInstallPlanWithCRDSchemaChange(t *testing.T) { }, }, } - _, cleanupCatalogSource = createInternalCatalogSource(t, c, crc, mainCatalogSourceName, testNamespace, mainManifests, []apiextensions.CustomResourceDefinition{mainCRD}, []v1alpha1.ClusterServiceVersion{mainStableCSV, mainBetaCSV}) - defer cleanupCatalogSource() + + updateInternalCatalog(t, c, crc, mainCatalogSourceName, testNamespace, []apiextensions.CustomResourceDefinition{mainCRD}, []v1alpha1.ClusterServiceVersion{mainStableCSV, mainBetaCSV}, mainManifests) // Attempt to get the catalog source before creating install plan(s) _, err = fetchCatalogSource(t, crc, mainCatalogSourceName, testNamespace, catalogSourceRegistryPodSynced) require.NoError(t, err)