Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,10 @@
"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working validating webhook",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - serial tests should be tolerant to tls secret deletion [Serial]",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
"labels": {
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook": {}
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion": {}
},
"resources": {
"isolation": {}
Expand All @@ -527,10 +527,10 @@
"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working mutating webhook [Serial]",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - parallel tests should have a working validating webhook",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
"labels": {
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook": {}
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook": {}
},
"resources": {
"isolation": {}
Expand All @@ -540,10 +540,10 @@
"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working conversion webhook [Serial]",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - parallel tests should have a working mutating webhook",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
"labels": {
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook": {}
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook": {}
},
"resources": {
"isolation": {}
Expand All @@ -553,10 +553,10 @@
"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should be tolerant to tls secret deletion [Serial]",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - parallel tests should have a working conversion webhook",
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
"labels": {
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion": {}
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook": {}
},
"resources": {
"isolation": {}
Expand Down
78 changes: 72 additions & 6 deletions openshift/tests-extension/test/webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ const (
webhookServiceCert = "webhook-operator-controller-manager-service-cert"
)

var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks",
Ordered, Serial, func() {
// Parallel webhook tests - can run concurrently
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - parallel tests",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need parallel test in the name?

Ordered, func() {
var (
k8sClient client.Client
dynamicClient dynamic.Interface
Expand All @@ -62,8 +63,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
By("requiring image-registry to be available")
helpers.RequireImageRegistry(ctx)

By("ensuring no ClusterExtension and CRD from a previous run")
helpers.EnsureCleanupClusterExtension(ctx, webhookOperatorPackageName, webhookOperatorCRDName)
// Note: No cleanup here - allows parallel tests to coexist with shared CRD

// Build webhook operator bundle and catalog using the consolidated helper
// Note: {{ TEST-BUNDLE }} and {{ NAMESPACE }} will be auto-filled
Expand Down Expand Up @@ -129,7 +129,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
}).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
})

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) {
It("should have a working mutating webhook", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook"), func(ctx SpecContext) {
By("creating a valid webhook")
mutatingWebhookResourceName := "mutating-webhook-test"
resource := newWebhookTest(mutatingWebhookResourceName, webhookOperatorInstallNamespace, true)
Expand All @@ -151,7 +151,7 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
}))
})

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) {
It("should have a working conversion webhook", Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook"), func(ctx SpecContext) {
By("creating a conversion webhook test resource")
conversionWebhookResourceName := "conversion-webhook-test"
resourceV1 := newWebhookTest(conversionWebhookResourceName, webhookOperatorInstallNamespace, true)
Expand All @@ -174,6 +174,72 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServi
},
}))
})
})

// Serial webhook test - must run after parallel tests complete
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks - serial tests",
Ordered, Serial, func() {
var (
k8sClient client.Client
dynamicClient dynamic.Interface
webhookOperatorInstallNamespace string
catalogName string
)

BeforeEach(func(ctx SpecContext) {
By("initializing Kubernetes client")
k8sClient = env.Get().K8sClient
restCfg := env.Get().RestCfg
var err error
dynamicClient, err = dynamic.NewForConfig(restCfg)
Expect(err).ToNot(HaveOccurred(), "failed to create dynamic client")

By("requiring OLMv1 capability on OpenShift")
helpers.RequireOLMv1CapabilityOnOpenshift()

By("requiring image-registry to be available")
helpers.RequireImageRegistry(ctx)

By("ensuring no ClusterExtension and CRD from previous parallel tests")
helpers.EnsureCleanupClusterExtension(ctx, webhookOperatorPackageName, webhookOperatorCRDName)

// Build webhook operator bundle and catalog using the consolidated helper
// Note: {{ TEST-BUNDLE }} and {{ NAMESPACE }} will be auto-filled

replacements := map[string]string{
"{{ TEST-BUNDLE }}": "", // Auto-filled
"{{ NAMESPACE }}": "", // Auto-filled
"{{ TEST-CONTROLLER }}": image.LocationFor("quay.io/olmtest/webhook-operator:v0.0.5"),
}

var nsName, opName string
_, nsName, catalogName, opName = helpers.NewCatalogAndClusterBundles(ctx, replacements,
webhookindex.AssetNames, webhookindex.Asset,
webhookbundle.AssetNames, webhookbundle.Asset,
)
By(fmt.Sprintf("webhook bundle %q and catalog %q built successfully in namespace %q", opName, catalogName, nsName))

// Create ClusterExtension in a separate namespace
// setupWebhookOperator now registers its own DeferCleanup handlers internally
webhookOperatorInstallNamespace = fmt.Sprintf("webhook-operator-%s", rand.String(5))
setupWebhookOperator(ctx, k8sClient, webhookOperatorInstallNamespace, catalogName)
})

AfterEach(func(ctx SpecContext) {
if CurrentSpecReport().Failed() {
By("dumping pod logs for debugging")
helpers.GetAllPodLogs(ctx, webhookOperatorInstallNamespace)
helpers.DescribePods(ctx, webhookOperatorInstallNamespace)
helpers.DescribeAllClusterCatalogs(ctx)
helpers.DescribeAllClusterExtensions(ctx, webhookOperatorInstallNamespace)
By("dumping webhook diagnostics")
// Additional diagnostics specific for this test
helpers.RunAndPrint(ctx, "get", "mutatingwebhookconfigurations.admissionregistration.k8s.io", "-oyaml")
helpers.RunAndPrint(ctx, "get", "validatingwebhookconfigurations.admissionregistration.k8s.io", "-oyaml")
}
// Note: cleanup is now handled by DeferCleanup in BeforeEach, which ensures
// cleanup runs even if BeforeEach or the test fails
})
Copy link
Contributor

@camilamacedo86 camilamacedo86 Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it passes in the payload aggregation, I am OK with it.
However, running as SERIAL we have the data that we need see:

  1. Go to : https://sippy.dptools.openshift.org/sippy-ng/tests/4.21
  2. Search for the suite ID like; NewOLMWebhook
  3. Then, you will see all tests. Adding image below
  4. By last if we click in ANY, we can see the execution with IPv6
Screenshot 2025-10-14 at 10 08 36 Screenshot 2025-10-14 at 10 08 55

Example

Screenshot 2025-10-14 at 10 09 57

So, I am not sure if we need to change anything since our goal is only make the tests in a way that pass in the validation of this PR: openshift/api#2491. See the result from yesterday exxecution: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_api/[…]ft-api-master-verify-feature-promotion/1977693404213022720

It is no longer saying 0, but it is saying it has X execution and needs 14.


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) {
certificateSecretName := webhookServiceCert
Expand Down