Skip to content

Commit 10f9051

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 4cf4d0b commit 10f9051

4 files changed

Lines changed: 921 additions & 1 deletion

File tree

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

Lines changed: 12 additions & 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{
@@ -77,6 +77,17 @@ func prepareOperatorTestsRegistry() (*oteextension.Registry, error) {
7777
},
7878
})
7979

80+
// The following suite runs tests that verify the operator's behaviour.
81+
// This suite is executed only on pull requests targeting this repository.
82+
// Tests tagged with [Parallel] and [Operator] are included in this suite.
83+
extension.AddSuite(oteextension.Suite{
84+
Name: "openshift/cluster-kube-apiserver-operator/operator/parallel",
85+
Parallelism: 1,
86+
Qualifiers: []string{
87+
`!name.contains("[Serial]") && name.contains("[Operator]")`,
88+
},
89+
})
90+
8091
specs, err := oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
8192
if err != nil {
8293
return nil, fmt.Errorf("couldn't build extension test specs from ginkgo: %w", err)

0 commit comments

Comments
 (0)