From 1b6816f3239b4937256be99752d155db74744bab Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Fri, 14 Jun 2019 12:55:29 -0400 Subject: [PATCH] fix(e2e): update catalog source instead of recreate This commit can be squashed upon next rebase. --- test/e2e/installplan_e2e_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)