Skip to content

Commit 009b8dc

Browse files
committed
normalize e2e test namespace generation
1 parent 23bbeb1 commit 009b8dc

13 files changed

+689
-714
lines changed

Diff for: test/e2e/catalog_e2e_test.go

+101-101
Large diffs are not rendered by default.

Diff for: test/e2e/catalog_exclusion_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const magicCatalogDir = "magiccatalog"
2121

2222
var _ = Describe("Global Catalog Exclusion", func() {
2323
var (
24-
testNamespace corev1.Namespace
24+
generatedNamespace corev1.Namespace
2525
determinedE2eClient *util.DeterminedE2EClient
2626
operatorGroup operatorsv1.OperatorGroup
2727
localCatalog *MagicCatalog
@@ -42,7 +42,7 @@ var _ = Describe("Global Catalog Exclusion", func() {
4242
TargetNamespaces: []string{e2eTestNamespace},
4343
},
4444
}
45-
testNamespace = SetupGeneratedTestNamespaceWithOperatorGroup(e2eTestNamespace, operatorGroup)
45+
generatedNamespace = SetupGeneratedTestNamespaceWithOperatorGroup(e2eTestNamespace, operatorGroup)
4646

4747
By("creating a broken catalog in the global namespace")
4848
globalCatalog := &v1alpha1.CatalogSource{
@@ -66,7 +66,7 @@ var _ = Describe("Global Catalog Exclusion", func() {
6666
var err error = nil
6767

6868
fbcPath := filepath.Join(testdataDir, magicCatalogDir, "fbc_initial.yaml")
69-
localCatalog, err = NewMagicCatalogFromFile(determinedE2eClient, testNamespace.GetName(), localCatalogName, fbcPath)
69+
localCatalog, err = NewMagicCatalogFromFile(determinedE2eClient, generatedNamespace.GetName(), localCatalogName, fbcPath)
7070
Expect(err).To(Succeed())
7171

7272
// deploy catalog blocks until the catalog has reached a ready state or fails
@@ -79,7 +79,7 @@ var _ = Describe("Global Catalog Exclusion", func() {
7979
})
8080

8181
AfterEach(func() {
82-
TeardownNamespace(testNamespace.GetName())
82+
TeardownNamespace(generatedNamespace.GetName())
8383
})
8484

8585
When("a subscription referring to the local catalog is created", func() {
@@ -88,7 +88,7 @@ var _ = Describe("Global Catalog Exclusion", func() {
8888
BeforeEach(func() {
8989
subscription = &v1alpha1.Subscription{
9090
ObjectMeta: metav1.ObjectMeta{
91-
Namespace: testNamespace.GetName(),
91+
Namespace: generatedNamespace.GetName(),
9292
Name: genName("local-subscription-"),
9393
},
9494
Spec: &v1alpha1.SubscriptionSpec{

Diff for: test/e2e/crd_e2e_test.go

+39-38
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)