Skip to content

Commit 4478f11

Browse files
committed
UPSTREAM: <carry>: support webhook case in disconnected
1 parent fc49ff0 commit 4478f11

25 files changed

+1783
-61
lines changed

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

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,10 @@
476476
},
477477
{
478478
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install an openshift catalog cluster extension",
479-
"labels": {},
479+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install an openshift catalog cluster extension",
480+
"labels": {
481+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install an openshift catalog cluster extension": {}
482+
},
480483
"resources": {
481484
"isolation": {}
482485
},
@@ -511,8 +514,11 @@
511514
"environmentSelector": {}
512515
},
513516
{
514-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
515-
"labels": {},
517+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working validating webhook",
518+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook",
519+
"labels": {
520+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working validating webhook": {}
521+
},
516522
"resources": {
517523
"isolation": {}
518524
},
@@ -521,8 +527,11 @@
521527
"environmentSelector": {}
522528
},
523529
{
524-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
525-
"labels": {},
530+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working mutating webhook [Serial]",
531+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook",
532+
"labels": {
533+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working mutating webhook": {}
534+
},
526535
"resources": {
527536
"isolation": {}
528537
},
@@ -531,8 +540,11 @@
531540
"environmentSelector": {}
532541
},
533542
{
534-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
535-
"labels": {},
543+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should have a working conversion webhook [Serial]",
544+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook",
545+
"labels": {
546+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should have a working conversion webhook": {}
547+
},
536548
"resources": {
537549
"isolation": {}
538550
},
@@ -541,8 +553,11 @@
541553
"environmentSelector": {}
542554
},
543555
{
544-
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
545-
"labels": {},
556+
"name": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA] OLMv1 operator with webhooks should be tolerant to tls secret deletion [Serial]",
557+
"originalName": "[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion",
558+
"labels": {
559+
"original-name:[sig-olmv1][OCPFeatureGate:NewOLMWebhookProviderOpenshiftServiceCA][Skipped:Disconnected][Serial] OLMv1 operator with webhooks should be tolerant to tls secret deletion": {}
560+
},
546561
"resources": {
547562
"isolation": {}
548563
},

openshift/tests-extension/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ pkg/bindata/catalog/catalog.go: $(shell find testdata/catalog -type f)
7878
mkdir -p $(@D)
7979
$(GO_BINDATA) -pkg catalog -o $@ -prefix "testdata/catalog" testdata/catalog/...
8080
go fmt ./$(@D)/...
81+
bindata: pkg/bindata/webhook/bundle/bundle.go
82+
pkg/bindata/webhook/bundle/bundle.go: $(shell find testdata/webhook/bundle -type f)
83+
mkdir -p $(@D)
84+
$(GO_BINDATA) -pkg webhookbundle -o $@ -prefix "testdata/webhook/bundle" testdata/webhook/bundle/...
85+
go fmt ./$(@D)/...
86+
87+
bindata: pkg/bindata/webhook/index/index.go
88+
pkg/bindata/webhook/index/index.go: $(shell find testdata/webhook/index -type f)
89+
mkdir -p $(@D)
90+
$(GO_BINDATA) -pkg webhookindex -o $@ -prefix "testdata/webhook/index" testdata/webhook/index/...
91+
go fmt ./$(@D)/...
8192

8293
bindata: pkg/bindata/qe/bindata.go
8394
pkg/bindata/qe/bindata.go: $(shell find test/qe/testdata -type f)
@@ -110,7 +121,7 @@ update-metadata: #HELP Build and run 'update-metadata' to generate test metadata
110121
# How to rename a test?
111122
# 1. Run: make list-test-names
112123
# 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")
124+
# 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.
114125
# 4. Change the test name string and run: make build-update
115126
# **Example**
116127
# It("should pass a renamed sanity check",

openshift/tests-extension/cmd/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ https://github.com/openshift-eng/openshift-tests-extension/blob/main/cmd/example
88
*/
99
package main
1010

11+
//nolint:gci // keep import order for readability
1112
import (
1213
"fmt"
1314
"os"
@@ -24,6 +25,7 @@ import (
2425
_ "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test/qe/specs"
2526
exutil "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test/qe/util"
2627
"github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/test/qe/util/filters"
28+
"github.com/openshift/origin/test/extended/util/image"
2729
)
2830

2931
func main() {
@@ -280,6 +282,10 @@ func main() {
280282
specs.AddBeforeAll(func() {
281283
env.Init()
282284
exutil.InitClusterEnv()
285+
// Initialize image repository mapping from KUBE_TEST_REPO environment variable
286+
// This allows tests to work in both connected (repo="") and disconnected (repo=custom) environments
287+
// The KUBE_TEST_REPO variable is set by openshift-tests via --from-repository flag
288+
image.InitializeImages(os.Getenv("KUBE_TEST_REPO"))
283289
})
284290

285291
ext.AddSpecs(specs)

openshift/tests-extension/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250722101414-8083129ab8f9
1111
github.com/openshift/api v0.0.0-20250808142411-c974eeafe3f1
1212
github.com/openshift/client-go v0.0.0-20250710075018-396b36f983ee
13-
github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63
13+
github.com/openshift/origin v1.5.0-alpha.3.0.20251010041851-79ff1dbbe815
1414
github.com/operator-framework/operator-controller v1.5.1
1515
github.com/pborman/uuid v1.2.1
1616
github.com/spf13/cobra v1.10.1

openshift/tests-extension/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0
201201
github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20250906192346-6efb6a95323f/go.mod h1:+UmuDIUnxxGlHHQvFhdg4s1XMRX+MBU1n70IYo18IOk=
202202
github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20250416174521-4eb003743b54 h1:ehXndVZfIk/fo18YJCMJ+6b8HL8tzqjP7yWgchMnfCc=
203203
github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20250416174521-4eb003743b54/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
204-
github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63 h1:kt7T98/AlpwFeMZlEqlwRJXWUW0kp9etoZ1uUmZfLnY=
205-
github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63/go.mod h1:thiTAaYNKIS7Lh6Lvzwi1JcE/TrX8oSc8u8PfP/Gaa8=
204+
github.com/openshift/origin v1.5.0-alpha.3.0.20251010041851-79ff1dbbe815 h1:Q8fO0DLFlhGKJThi2V+zg8A1acvxj3Cwi+5ZPsY4RsI=
205+
github.com/openshift/origin v1.5.0-alpha.3.0.20251010041851-79ff1dbbe815/go.mod h1:thiTAaYNKIS7Lh6Lvzwi1JcE/TrX8oSc8u8PfP/Gaa8=
206206
github.com/operator-framework/operator-controller v1.5.1 h1:J3xdRHzh9ajuKt/i1fWxoOLUf3kMpaOnGf1XNZ6+Klg=
207207
github.com/operator-framework/operator-controller v1.5.1/go.mod h1:6BpO9yzrmr1s7zqnk7YUA9SJlNVD+gA25JS5sg6axCE=
208208
github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=

0 commit comments

Comments
 (0)