Skip to content

Commit 795c75e

Browse files
Per Goncalves da Silvaci-robot
authored andcommitted
UPSTREAM: <carry>: Update webhook ote tests to use latest webhook-operator
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
1 parent 1b0152c commit 795c75e

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

openshift/tests-extension/pkg/bindata/catalog/catalog.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openshift/tests-extension/pkg/bindata/operator/operator.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openshift/tests-extension/test/webhooks.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232
webhookCatalogName = "webhook-operator-catalog"
3333
webhookOperatorPackageName = "webhook-operator"
3434
webhookOperatorCRDName = "webhooktests.webhook.operators.coreos.io"
35-
webhookServiceCert = "webhook-operator-webhook-service-cert"
35+
webhookServiceCert = "webhook-operator-controller-manager-service-cert"
3636
)
3737

3838
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks",
@@ -63,7 +63,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
6363
err = k8sClient.Get(ctx, client.ObjectKey{Name: webhookCatalogName}, catalog)
6464
if apierrors.IsNotFound(err) {
6565
By(fmt.Sprintf("creating the webhook-operator catalog with name %s", webhookCatalogName))
66-
catalog = helpers.NewClusterCatalog(webhookCatalogName, "quay.io/operator-framework/webhook-operator-index:0.0.3")
66+
catalog = helpers.NewClusterCatalog(webhookCatalogName, "quay.io/operator-framework/webhook-operator-index:0.0.4")
6767
err = k8sClient.Create(ctx, catalog)
6868
Expect(err).ToNot(HaveOccurred())
6969

@@ -286,7 +286,7 @@ func setupWebhookOperator(ctx SpecContext, k8sClient client.Client, webhookOpera
286286
helpers.ExpectClusterRoleBindingExists(ctx, operatorClusterRoleBindingName)
287287

288288
ceName := webhookOperatorInstallNamespace
289-
ce := helpers.NewClusterExtensionObject("webhook-operator", "0.0.1", ceName, saName, webhookOperatorInstallNamespace)
289+
ce := helpers.NewClusterExtensionObject("webhook-operator", "0.0.4", ceName, saName, webhookOperatorInstallNamespace)
290290
ce.Spec.Source.Catalog.Selector = &metav1.LabelSelector{
291291
MatchLabels: map[string]string{
292292
"olm.operatorframework.io/metadata.name": webhookCatalogName,
@@ -299,7 +299,7 @@ func setupWebhookOperator(ctx SpecContext, k8sClient client.Client, webhookOpera
299299
helpers.ExpectClusterExtensionToBeInstalled(ctx, ceName)
300300

301301
By("waiting for the webhook operator's service to be ready")
302-
serviceName := "webhook-operator-webhook-service" // Standard name for the service created by the operator
302+
serviceName := "webhook-operator-controller-manager-service" // Standard name for the service created by the operator
303303
Eventually(func(g Gomega) {
304304
svc := &corev1.Service{}
305305
err := k8sClient.Get(ctx, client.ObjectKey{Name: serviceName, Namespace: webhookOperatorInstallNamespace}, svc)
@@ -309,19 +309,18 @@ func setupWebhookOperator(ctx SpecContext, k8sClient client.Client, webhookOpera
309309
}).WithTimeout(1*time.Minute).WithPolling(5*time.Second).Should(Succeed(), "webhook service did not become ready within timeout")
310310

311311
By("waiting for the webhook operator's service certificate secret to exist and be populated")
312-
certificateSecretName := "webhook-operator-webhook-service-cert" // Fixed to use the static name
313312
Eventually(func(g Gomega) {
314313
secret := &corev1.Secret{}
315314
// Force bypassing the client cache for this Get operation
316-
err := k8sClient.Get(ctx, client.ObjectKey{Name: certificateSecretName, Namespace: webhookOperatorInstallNamespace}, secret) // Removed client.WithCacheDisabled
315+
err := k8sClient.Get(ctx, client.ObjectKey{Name: webhookServiceCert, Namespace: webhookOperatorInstallNamespace}, secret) // Removed client.WithCacheDisabled
317316

318317
if apierrors.IsNotFound(err) {
319-
GinkgoLogr.Info(fmt.Sprintf("Secret %s/%s not found yet (still polling)", webhookOperatorInstallNamespace, certificateSecretName))
318+
GinkgoLogr.Info(fmt.Sprintf("Secret %s/%s not found yet (still polling)", webhookOperatorInstallNamespace, webhookServiceCert))
320319
return // Keep polling if not found
321320
}
322321

323322
g.Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to get webhook service certificate secret %s/%s: %v",
324-
webhookOperatorInstallNamespace, certificateSecretName, err))
323+
webhookOperatorInstallNamespace, webhookServiceCert, err))
325324
g.Expect(secret.Data).ToNot(BeEmpty(), "expected webhook service certificate secret data to not be empty")
326325
}).WithTimeout(5*time.Minute).WithPolling(5*time.Second).Should(Succeed(), "webhook service certificate secret did not become available within timeout")
327326

0 commit comments

Comments
 (0)