@@ -2,12 +2,13 @@ package e2e
22
33import (
44 "context"
5- "k8s.io/apimachinery/pkg/runtime/schema"
6- "k8s.io/client-go/dynamic"
75
86 . "github.com/onsi/ginkgo"
97 . "github.com/onsi/gomega"
8+
109 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10+ "k8s.io/apimachinery/pkg/runtime/schema"
11+ "k8s.io/client-go/dynamic"
1112
1213 "github.com/operator-framework/api/pkg/operators/v1alpha1"
1314 "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() {
4546 sourceName = "test-catalog"
4647 imageName = "quay.io/olmtest/single-bundle-index:pdb"
4748 )
49+
50+ var installPlanRef string
4851 // create catalog source
4952 source := & v1alpha1.CatalogSource {
5053 TypeMeta : metav1.TypeMeta {
@@ -69,10 +72,16 @@ var _ = Describe("Installing bundles with new object types", func() {
6972 _ = createSubscriptionForCatalog (operatorClient , source .GetNamespace (), subName , source .GetName (), packageName , channelName , "" , v1alpha1 .ApprovalAutomatic )
7073
7174 // 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 )
7685 })
7786
7887 It ("should create the additional bundle objects" , func () {
0 commit comments