Skip to content

Commit 2cc8ce7

Browse files
committed
test: Add network policy enforcement tests
Add comprehensive NetworkPolicy tests for kube-apiserver and kube-apiserver-operator namespaces. Tests verify policy creation, reconciliation, and enforcement including default-deny and allow rules patterns. Signed-off-by: Kaleemullah Siddiqui <ksiddiqu@redhat.com>
1 parent 9b45cba commit 2cc8ce7

6 files changed

Lines changed: 1177 additions & 14 deletions

File tree

cmd/cluster-kube-apiserver-operator-tests-ext/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func prepareOperatorTestsRegistry() (*oteextension.Registry, error) {
6666
registry := oteextension.NewRegistry()
6767
extension := oteextension.NewExtension("openshift", "payload", "cluster-kube-apiserver-operator")
6868

69-
// The following suite runs tests that verify the operators behaviour.
69+
// The following suite runs tests that verify the operator's behaviour.
7070
// This suite is executed only on pull requests targeting this repository.
7171
// Tests tagged with both [Operator] and [Serial] are included in this suite.
7272
extension.AddSuite(oteextension.Suite{

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ require (
1313
github.com/imdario/mergo v0.3.8
1414
github.com/miekg/dns v1.1.61
1515
github.com/onsi/ginkgo/v2 v2.27.2
16+
github.com/onsi/gomega v1.38.2
1617
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250804142706-7b3ab438a292
1718
github.com/openshift/api v0.0.0-20260317165824-54a3998d81eb
1819
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee
@@ -37,8 +38,6 @@ require (
3738
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96
3839
)
3940

40-
require github.com/onsi/gomega v1.38.2
41-
4241
require (
4342
cel.dev/expr v0.24.0 // indirect
4443
github.com/NYTimes/gziphandler v1.1.1 // indirect

0 commit comments

Comments
 (0)