@@ -2,12 +2,13 @@ package e2e
2
2
3
3
import (
4
4
"context"
5
- "k8s.io/apimachinery/pkg/runtime/schema"
6
- "k8s.io/client-go/dynamic"
7
5
8
6
. "github.com/onsi/ginkgo"
9
7
. "github.com/onsi/gomega"
8
+
10
9
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10
+ "k8s.io/apimachinery/pkg/runtime/schema"
11
+ "k8s.io/client-go/dynamic"
11
12
12
13
"github.com/operator-framework/api/pkg/operators/v1alpha1"
13
14
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
@@ -45,6 +46,8 @@ var _ = Describe("Installing bundles with new object types", func() {
45
46
sourceName = "test-catalog"
46
47
imageName = "quay.io/olmtest/single-bundle-index:pdb"
47
48
)
49
+
50
+ var installPlanRef string
48
51
// create catalog source
49
52
source := & v1alpha1.CatalogSource {
50
53
TypeMeta : metav1.TypeMeta {
@@ -69,10 +72,16 @@ var _ = Describe("Installing bundles with new object types", func() {
69
72
_ = createSubscriptionForCatalog (operatorClient , source .GetNamespace (), subName , source .GetName (), packageName , channelName , "" , v1alpha1 .ApprovalAutomatic )
70
73
71
74
// Wait for the Subscription to succeed
72
- Eventually (func () error {
73
- _ , err = fetchSubscription (operatorClient , testNamespace , subName , subscriptionStateAtLatestChecker )
74
- return err
75
- }).Should (BeNil ())
75
+ sub , err := fetchSubscription (operatorClient , testNamespace , subName , subscriptionStateAtLatestChecker )
76
+ Expect (err ).ToNot (HaveOccurred (), "could not get subscription at latest status" )
77
+
78
+ installPlanRef = sub .Status .InstallPlanRef .Name
79
+
80
+ // Wait for the installplan to complete (5 minute timeout)
81
+ _ , err = fetchInstallPlan (GinkgoT (), operatorClient , installPlanRef , buildInstallPlanPhaseCheckFunc (v1alpha1 .InstallPlanPhaseComplete ))
82
+ Expect (err ).ToNot (HaveOccurred (), "could not get installplan at complete phase" )
83
+
84
+ ctx .Ctx ().Logf ("install plan %s completed" , installPlanRef )
76
85
})
77
86
78
87
It ("should create the additional bundle objects" , func () {
0 commit comments