Skip to content

Commit 949740a

Browse files
UPSTREAM: <carry>: for incompatible test add func to wait builder and deployer SA creation by OCP controller
1 parent d9f86c1 commit 949740a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

openshift/tests-extension/pkg/helpers/cluster_extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func ExpectServiceAccountExists(ctx context.Context, name, namespace string) {
185185
Eventually(func(g Gomega) {
186186
err := k8sClient.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, sa)
187187
g.Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to get ServiceAccount %q/%q: %v", namespace, name, err))
188-
}).WithTimeout(10*time.Second).WithPolling(1*time.Second).Should(Succeed(), "ServiceAccount %q/%q did not become visible within timeout", namespace, name)
188+
}).WithTimeout(5*time.Minute).WithPolling(3*time.Second).Should(Succeed(), "ServiceAccount %q/%q did not become visible within timeout", namespace, name)
189189
}
190190

191191
// ExpectClusterRoleBindingExists waits for a ClusterRoleBinding to be available and visible to the client.

openshift/tests-extension/test/olmv1-incompatible.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1
6868
nsCleanup := createNamespace(nsName)
6969
DeferCleanup(nsCleanup)
7070

71+
// The builder (and deployer) service accounts are created by OpenShift itself which injects them in the NS.
72+
By(fmt.Sprintf("waiting for builder serviceaccount in %s", nsName))
73+
helpers.ExpectServiceAccountExists(ctx, "builder", nsName)
74+
75+
By(fmt.Sprintf("waiting for deployer serviceaccount in %s", nsName))
76+
helpers.ExpectServiceAccountExists(ctx, "deployer", nsName)
77+
7178
By("applying image-puller RoleBinding")
7279
rbCleanup := createImagePullerRoleBinding(rbName, nsName)
7380
DeferCleanup(rbCleanup)

0 commit comments

Comments
 (0)