Skip to content

Commit af98a0c

Browse files
committed
UPSTREAM: <carry>: support disconnected
1 parent 10fea86 commit af98a0c

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,11 @@
495495
"environmentSelector": {}
496496
},
497497
{
498-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
499-
"labels": {},
498+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working validating webhook",
499+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
500+
"labels": {
501+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook": {}
502+
},
500503
"resources": {
501504
"isolation": {}
502505
},
@@ -505,8 +508,11 @@
505508
"environmentSelector": {}
506509
},
507510
{
508-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
509-
"labels": {},
511+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working mutating webhook [Serial]",
512+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
513+
"labels": {
514+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook": {}
515+
},
510516
"resources": {
511517
"isolation": {}
512518
},
@@ -515,8 +521,11 @@
515521
"environmentSelector": {}
516522
},
517523
{
518-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
519-
"labels": {},
524+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working conversion webhook [Serial]",
525+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
526+
"labels": {
527+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook": {}
528+
},
520529
"resources": {
521530
"isolation": {}
522531
},
@@ -525,8 +534,11 @@
525534
"environmentSelector": {}
526535
},
527536
{
528-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
529-
"labels": {},
537+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should be tolerant to tls secret deletion [Serial]",
538+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
539+
"labels": {
540+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion": {}
541+
},
530542
"resources": {
531543
"isolation": {}
532544
},

openshift/tests-extension/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ update-metadata: #HELP Build and run 'update-metadata' to generate test metadata
110110
# How to rename a test?
111111
# 1. Run: make list-test-names
112112
# 2. Find the current full test name (e.g. "[sig-abc] My test does XYZ")
113-
# 3. Add a Ginkgo label: ginkgo.Label("original-name:[sig-abc] My test does XYZ")
113+
# 3. Add a Ginkgo label: ginkgo.Label("original-name:[sig-abc] My test does XYZ"). if there is existing original-name label, please do not update the label again and keep it unchanged.
114114
# 4. Change the test name string and run: make build-update
115115
# **Example**
116116
# It("should pass a renamed sanity check",

openshift/tests-extension/test/webhooks.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package test
22

3+
//nolint:gci // keep import order for readability
34
import (
45
"context"
56
"crypto/x509"
@@ -26,6 +27,7 @@ import (
2627

2728
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env"
2829
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/helpers"
30+
"github.com/openshift/origin/test/extended/util/image"
2931
)
3032

3133
const (
@@ -35,7 +37,7 @@ const (
3537
webhookServiceCert = "webhook-operator-controller-manager-service-cert"
3638
)
3739

38-
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks",
40+
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks",
3941
Ordered, Serial, func() {
4042
var (
4143
k8sClient client.Client
@@ -63,7 +65,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
6365
err = k8sClient.Get(ctx, client.ObjectKey{Name: webhookCatalogName}, catalog)
6466
if apierrors.IsNotFound(err) {
6567
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.4")
68+
catalog = helpers.NewClusterCatalog(webhookCatalogName, image.LocationFor("quay.io/olmtest/webhook-operator-index:v0.0.5"))
6769
err = k8sClient.Create(ctx, catalog)
6870
Expect(err).ToNot(HaveOccurred())
6971

@@ -95,7 +97,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
9597
}
9698
})
9799

98-
It("should have a working validating webhook", func(ctx SpecContext) {
100+
It("should have a working validating webhook", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook"), func(ctx SpecContext) {
99101
By("creating a webhook test resource that will be rejected by the validating webhook")
100102
Eventually(func() error {
101103
name := fmt.Sprintf("validating-webhook-test-%s", rand.String(5))
@@ -121,7 +123,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
121123
}).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
122124
})
123125

124-
It("should have a working mutating webhook", func(ctx SpecContext) {
126+
It("should have a working mutating webhook [Serial]", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook"), func(ctx SpecContext) {
125127
By("creating a valid webhook")
126128
mutatingWebhookResourceName := "mutating-webhook-test"
127129
resource := newWebhookTest(mutatingWebhookResourceName, webhookOperatorInstallNamespace, true)
@@ -143,7 +145,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
143145
}))
144146
})
145147

146-
It("should have a working conversion webhook", func(ctx SpecContext) {
148+
It("should have a working conversion webhook [Serial]", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook"), func(ctx SpecContext) {
147149
By("creating a conversion webhook test resource")
148150
conversionWebhookResourceName := "conversion-webhook-test"
149151
resourceV1 := newWebhookTest(conversionWebhookResourceName, webhookOperatorInstallNamespace, true)
@@ -167,7 +169,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
167169
}))
168170
})
169171

170-
It("should be tolerant to tls secret deletion", func(ctx SpecContext) {
172+
It("should be tolerant to tls secret deletion [Serial]", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion"), func(ctx SpecContext) {
171173
certificateSecretName := webhookServiceCert
172174
By("ensuring secret exists before deletion attempt")
173175
Eventually(func(g Gomega) {
@@ -286,7 +288,7 @@ func setupWebhookOperator(ctx SpecContext, k8sClient client.Client, webhookOpera
286288
helpers.ExpectClusterRoleBindingExists(ctx, operatorClusterRoleBindingName)
287289

288290
ceName := webhookOperatorInstallNamespace
289-
ce := helpers.NewClusterExtensionObject("webhook-operator", "0.0.4", ceName, saName, webhookOperatorInstallNamespace)
291+
ce := helpers.NewClusterExtensionObject("webhook-operator", "0.0.5", ceName, saName, webhookOperatorInstallNamespace)
290292
ce.Spec.Source.Catalog.Selector = &metav1.LabelSelector{
291293
MatchLabels: map[string]string{
292294
"olm.operatorframework.io/metadata.name": webhookCatalogName,

0 commit comments

Comments
 (0)