Skip to content

Commit

Permalink
fix(e2e): update catalog source instead of recreate
Browse files Browse the repository at this point in the history
This commit can be squashed upon next rebase.
  • Loading branch information
Jeff Peeler committed Jun 14, 2019
1 parent ce813e2 commit 1b6816f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/e2e/installplan_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 1b6816f

Please sign in to comment.