Skip to content

Commit 43747ca

Browse files
committed
Create separate Go module for test extension
This commit introduces dependency isolation by creating a separate Go module for the OpenShift API Server test extension at test/extended/tests-extension/. Key benefits: - Isolates test dependencies (ginkgo, gomega, openshift-tests-extension) from production operator code - Prevents dependency version conflicts between operator and test framework - Keeps production go.mod clean and focused on operator requirements - Follows the pattern used by other OpenShift operators The separate module includes: - go.mod with test-specific dependencies - go.sum with locked dependency versions - Same k8s.io version pinning as root module via replace directives Reference implementation: https://github.com/openshift/operator-framework-operator-controller/tree/main/openshift/tests-extension
1 parent c4e5612 commit 43747ca

File tree

2 files changed

+344
-0
lines changed

2 files changed

+344
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
module github.com/openshift/openshift-apiserver/test/extended/tests-extension
2+
3+
go 1.24.0
4+
5+
require (
6+
github.com/onsi/ginkgo/v2 v2.23.4
7+
github.com/onsi/gomega v1.38.0
8+
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250804142706-7b3ab438a292
9+
github.com/openshift/client-go v0.0.0-20250811163556-6193816ae379
10+
k8s.io/api v0.33.3
11+
k8s.io/apimachinery v0.33.3
12+
k8s.io/client-go v0.33.3
13+
k8s.io/kubectl v0.33.3
14+
k8s.io/kubernetes v1.33.3
15+
)
16+
17+
require (
18+
cel.dev/expr v0.19.1 // indirect
19+
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
20+
github.com/beorn7/perks v1.0.1 // indirect
21+
github.com/blang/semver/v4 v4.0.0 // indirect
22+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
23+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
24+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
25+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
26+
github.com/go-logr/logr v1.4.2 // indirect
27+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
28+
github.com/go-openapi/jsonreference v0.20.2 // indirect
29+
github.com/go-openapi/swag v0.23.0 // indirect
30+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
31+
github.com/gogo/protobuf v1.3.2 // indirect
32+
github.com/google/cel-go v0.23.2 // indirect
33+
github.com/google/gnostic-models v0.6.9 // indirect
34+
github.com/google/go-cmp v0.7.0 // indirect
35+
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
36+
github.com/google/uuid v1.6.0 // indirect
37+
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
38+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
39+
github.com/josharian/intern v1.0.0 // indirect
40+
github.com/json-iterator/go v1.1.12 // indirect
41+
github.com/mailru/easyjson v0.7.7 // indirect
42+
github.com/moby/spdystream v0.5.0 // indirect
43+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
44+
github.com/modern-go/reflect2 v1.0.2 // indirect
45+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
46+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
47+
github.com/openshift/api v0.0.0-20250820105013-6282350d0c39 // indirect
48+
github.com/pkg/errors v0.9.1 // indirect
49+
github.com/prometheus/client_golang v1.22.0 // indirect
50+
github.com/prometheus/client_model v0.6.1 // indirect
51+
github.com/prometheus/common v0.62.0 // indirect
52+
github.com/prometheus/procfs v0.15.1 // indirect
53+
github.com/spf13/cobra v1.8.1 // indirect
54+
github.com/spf13/pflag v1.0.5 // indirect
55+
github.com/stoewer/go-strcase v1.3.0 // indirect
56+
github.com/x448/float16 v0.8.4 // indirect
57+
go.opentelemetry.io/otel v1.33.0 // indirect
58+
go.opentelemetry.io/otel/trace v1.33.0 // indirect
59+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
60+
golang.org/x/net v0.41.0 // indirect
61+
golang.org/x/oauth2 v0.27.0 // indirect
62+
golang.org/x/sys v0.33.0 // indirect
63+
golang.org/x/term v0.32.0 // indirect
64+
golang.org/x/text v0.26.0 // indirect
65+
golang.org/x/time v0.9.0 // indirect
66+
golang.org/x/tools v0.33.0 // indirect
67+
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
68+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
69+
google.golang.org/protobuf v1.36.6 // indirect
70+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
71+
gopkg.in/inf.v0 v0.9.1 // indirect
72+
gopkg.in/yaml.v3 v3.0.1 // indirect
73+
k8s.io/apiserver v0.33.3 // indirect
74+
k8s.io/component-base v0.33.3 // indirect
75+
k8s.io/klog/v2 v2.130.1 // indirect
76+
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
77+
k8s.io/pod-security-admission v0.0.0 // indirect
78+
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
79+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
80+
sigs.k8s.io/randfill v1.0.0 // indirect
81+
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
82+
sigs.k8s.io/yaml v1.4.0 // indirect
83+
)
84+
85+
replace (
86+
github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20241205171354-8006f302fd12
87+
k8s.io/api => k8s.io/api v0.33.3
88+
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.33.3
89+
k8s.io/apimachinery => k8s.io/apimachinery v0.33.3
90+
k8s.io/apiserver => github.com/openshift/kubernetes-apiserver v0.0.0-20250917144435-182485d204aa
91+
k8s.io/cli-runtime => k8s.io/cli-runtime v0.33.3
92+
k8s.io/client-go => k8s.io/client-go v0.33.3
93+
k8s.io/cloud-provider => k8s.io/cloud-provider v0.33.3
94+
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.33.3
95+
k8s.io/code-generator => k8s.io/code-generator v0.33.3
96+
k8s.io/component-base => k8s.io/component-base v0.33.3
97+
k8s.io/component-helpers => k8s.io/component-helpers v0.33.3
98+
k8s.io/controller-manager => k8s.io/controller-manager v0.33.3
99+
k8s.io/cri-api => k8s.io/cri-api v0.33.3
100+
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.33.3
101+
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.33.3
102+
k8s.io/endpointslice => k8s.io/endpointslice v0.33.3
103+
k8s.io/kms => k8s.io/kms v0.33.3
104+
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.33.3
105+
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.33.3
106+
k8s.io/kube-proxy => k8s.io/kube-proxy v0.33.3
107+
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.33.3
108+
k8s.io/kubectl => k8s.io/kubectl v0.33.3
109+
k8s.io/kubelet => k8s.io/kubelet v0.33.3
110+
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.33.3
111+
k8s.io/metrics => k8s.io/metrics v0.33.3
112+
k8s.io/mount-utils => k8s.io/mount-utils v0.33.3
113+
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.33.3
114+
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.33.3
115+
)

0 commit comments

Comments
 (0)