@@ -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 {
@@ -70,9 +73,19 @@ var _ = Describe("Installing bundles with new object types", func() {
70
73
71
74
// Wait for the Subscription to succeed
72
75
Eventually (func () error {
73
- _ , err = fetchSubscription (operatorClient , testNamespace , subName , subscriptionStateAtLatestChecker )
76
+ sub , err := fetchSubscription (operatorClient , testNamespace , subName , subscriptionStateAtLatestChecker )
77
+ if sub != nil && sub .Status .InstallPlanRef != nil {
78
+ installPlanRef = sub .Status .InstallPlanRef .Name
79
+ }
80
+ return err
81
+ }).Should (BeNil ())
82
+
83
+ // Wait for the installplan to complete (5 minute timeout)
84
+ Eventually (func () error {
85
+ _ , err := fetchInstallPlan (GinkgoT (), operatorClient , installPlanRef , buildInstallPlanPhaseCheckFunc (v1alpha1 .InstallPlanPhaseComplete ))
74
86
return err
75
87
}).Should (BeNil ())
88
+ ctx .Ctx ().Logf ("install plan %s completed" , installPlanRef )
76
89
})
77
90
78
91
It ("should create the additional bundle objects" , func () {
0 commit comments