Skip to content

Commit 45398bf

Browse files
committed
Modify dynamic_resource_e2e_test to ginkgo
1 parent 15f5ba3 commit 45398bf

13 files changed

+608
-549
lines changed

test/e2e/catalog_e2e_test.go

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

test/e2e/crd_e2e_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var _ = Describe("CRD Versions", func() {
2424
By("This test proves that OLM is able to handle v1beta1 CRDs successfully. Creating v1 CRDs has more " +
2525
"restrictions around the schema. v1beta1 validation schemas are not necessarily valid in v1. " +
2626
"OLM should support both v1beta1 and v1 CRDs")
27-
c := newKubeClient(GinkgoT())
28-
crc := newCRClient(GinkgoT())
27+
c := newKubeClient()
28+
crc := newCRClient()
2929

3030
mainPackageName := genName("nginx-update2-")
3131
mainPackageStable := fmt.Sprintf("%s-stable", mainPackageName)
@@ -80,14 +80,14 @@ var _ = Describe("CRD Versions", func() {
8080
defer cleanupMainCatalogSource()
8181

8282
// Attempt to get the catalog source before creating install plan
83-
_, err := fetchCatalogSource(GinkgoT(), crc, mainCatalogName, testNamespace, catalogSourceRegistryPodSynced)
83+
_, err := fetchCatalogSourceOnStatus(crc, mainCatalogName, testNamespace, catalogSourceRegistryPodSynced)
8484
Expect(err).ToNot(HaveOccurred())
8585

8686
subscriptionName := genName("sub-nginx-update2-")
87-
subscriptionCleanup := createSubscriptionForCatalog(GinkgoT(), crc, testNamespace, subscriptionName, mainCatalogName, mainPackageName, stableChannel, "", operatorsv1alpha1.ApprovalAutomatic)
87+
subscriptionCleanup := createSubscriptionForCatalog(crc, testNamespace, subscriptionName, mainCatalogName, mainPackageName, stableChannel, "", operatorsv1alpha1.ApprovalAutomatic)
8888
defer subscriptionCleanup()
8989

90-
subscription, err := fetchSubscription(GinkgoT(), crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
90+
subscription, err := fetchSubscription(crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
9191
Expect(err).ToNot(HaveOccurred())
9292
Expect(subscription).ToNot(Equal(nil))
9393
Expect(subscription.Status.InstallPlanRef).ToNot(Equal(nil))
@@ -103,8 +103,8 @@ var _ = Describe("CRD Versions", func() {
103103
})
104104
It("creates v1 CRDs with a v1 schema successfully", func() {
105105
By("v1 crds with a valid openapiv3 schema should be created successfully by OLM")
106-
c := newKubeClient(GinkgoT())
107-
crc := newCRClient(GinkgoT())
106+
c := newKubeClient()
107+
crc := newCRClient()
108108

109109
mainPackageName := genName("nginx-update2-")
110110
mainPackageStable := fmt.Sprintf("%s-stable", mainPackageName)
@@ -152,14 +152,14 @@ var _ = Describe("CRD Versions", func() {
152152
defer cleanupMainCatalogSource()
153153

154154
// Attempt to get the catalog source before creating install plan
155-
_, err := fetchCatalogSource(GinkgoT(), crc, mainCatalogName, testNamespace, catalogSourceRegistryPodSynced)
155+
_, err := fetchCatalogSourceOnStatus(crc, mainCatalogName, testNamespace, catalogSourceRegistryPodSynced)
156156
Expect(err).ToNot(HaveOccurred())
157157

158158
subscriptionName := genName("sub-nginx-update2-")
159-
subscriptionCleanup := createSubscriptionForCatalog(GinkgoT(), crc, testNamespace, subscriptionName, mainCatalogName, mainPackageName, stableChannel, "", operatorsv1alpha1.ApprovalAutomatic)
159+
subscriptionCleanup := createSubscriptionForCatalog(crc, testNamespace, subscriptionName, mainCatalogName, mainPackageName, stableChannel, "", operatorsv1alpha1.ApprovalAutomatic)
160160
defer subscriptionCleanup()
161161

162-
subscription, err := fetchSubscription(GinkgoT(), crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
162+
subscription, err := fetchSubscription(crc, testNamespace, subscriptionName, subscriptionHasInstallPlanChecker)
163163
Expect(err).ToNot(HaveOccurred())
164164
Expect(subscription).ToNot(Equal(nil))
165165
Expect(subscription.Status.InstallPlanRef).ToNot(Equal(nil))
@@ -173,7 +173,7 @@ var _ = Describe("CRD Versions", func() {
173173
GinkgoT().Logf("Install plan %s fetched with status %s", fetchedInstallPlan.GetName(), fetchedInstallPlan.Status.Phase)
174174
Expect(fetchedInstallPlan.Status.Phase).To(Equal(operatorsv1alpha1.InstallPlanPhaseComplete))
175175
})
176-
AfterEach(func() { cleaner.NotifyTestComplete(GinkgoT(), true) }, float64(10))
176+
AfterEach(func() { cleaner.NotifyTestComplete(true) }, float64(10))
177177
})
178178

179179
func checkCRD(v1crd *apiextensionsv1.CustomResourceDefinition) bool {

0 commit comments

Comments
 (0)