From 4dc23908379819a22b8ad3308153dcc059660235 Mon Sep 17 00:00:00 2001 From: Kui Wang Date: Wed, 25 Feb 2026 13:29:24 +0800 Subject: [PATCH 1/2] update the network policy port per new change --- .../openshift_payload_olmv0.json | 3 +- .../test/qe/specs/olmv0_microshift.go | 7 +++-- .../test/qe/specs/olmv0_networkpolicy.go | 31 ++++++++++++------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/tests-extension/.openshift-tests-extension/openshift_payload_olmv0.json b/tests-extension/.openshift-tests-extension/openshift_payload_olmv0.json index 5395fcfa1c..e03c6cff70 100644 --- a/tests-extension/.openshift-tests-extension/openshift_payload_olmv0.json +++ b/tests-extension/.openshift-tests-extension/openshift_payload_olmv0.json @@ -1473,6 +1473,7 @@ "originalName": "[sig-operator][Jira:OLM] OLMv0 on microshift PolarionID:83581-[Skipped:Disconnected]olmv0 networkpolicy on microshift.", "labels": { "Extended": {}, + "Lifecycle:informing": {}, "NonHyperShiftHOST": {}, "original-name:[sig-operator][Jira:OLM] OLMv0 on microshift PolarionID:83581-[Skipped:Disconnected]olmv0 networkpolicy on microshift.": {} }, @@ -1480,7 +1481,7 @@ "isolation": {} }, "source": "openshift:payload:olmv0", - "lifecycle": "blocking", + "lifecycle": "informing", "environmentSelector": { "exclude": "topology==\"External\"" } diff --git a/tests-extension/test/qe/specs/olmv0_microshift.go b/tests-extension/test/qe/specs/olmv0_microshift.go index ee0a7f9186..a52edea4d8 100644 --- a/tests-extension/test/qe/specs/olmv0_microshift.go +++ b/tests-extension/test/qe/specs/olmv0_microshift.go @@ -7,6 +7,7 @@ import ( g "github.com/onsi/ginkgo/v2" o "github.com/onsi/gomega" + ote "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo" exutil "github.com/openshift/operator-framework-olm/tests-extension/test/qe/util" "github.com/openshift/operator-framework-olm/tests-extension/test/qe/util/olmv0util" @@ -219,7 +220,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 on microshift", g.Label("NonH }) - g.It("PolarionID:83581-[OTP][Skipped:Disconnected]olmv0 networkpolicy on microshift.", g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 on microshift PolarionID:83581-[Skipped:Disconnected]olmv0 networkpolicy on microshift."), func() { + g.It("PolarionID:83581-[OTP][Skipped:Disconnected]olmv0 networkpolicy on microshift.", ote.Informing(), g.Label("original-name:[sig-operator][Jira:OLM] OLMv0 on microshift PolarionID:83581-[Skipped:Disconnected]olmv0 networkpolicy on microshift."), func() { policies := []olmv0util.NpExpecter{ { @@ -233,7 +234,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 on microshift", g.Label("NonH }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -269,7 +270,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 on microshift", g.Label("NonH }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { diff --git a/tests-extension/test/qe/specs/olmv0_networkpolicy.go b/tests-extension/test/qe/specs/olmv0_networkpolicy.go index 62676c89b2..7903083112 100644 --- a/tests-extension/test/qe/specs/olmv0_networkpolicy.go +++ b/tests-extension/test/qe/specs/olmv0_networkpolicy.go @@ -52,7 +52,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -88,7 +88,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -112,7 +112,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -136,7 +136,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -174,7 +174,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, }, { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, Selectors: nil, }, { @@ -219,7 +219,16 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { ExpectIngress: nil, ExpectEgress: []olmv0util.EgressRule{ { - Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, + Ports: []olmv0util.Port{{}}, + Selectors: nil, + }, + { + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, + }, Selectors: nil, }, }, @@ -291,7 +300,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { {Ports: []olmv0util.Port{{Port: "metrics", Protocol: "TCP"}}, Selectors: nil}, }, ExpectEgress: []olmv0util.EgressRule{ - {Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, Selectors: nil}, + {Ports: []olmv0util.Port{{}}, Selectors: nil}, { Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, Selectors: []olmv0util.Selector{ @@ -318,7 +327,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { {Ports: []olmv0util.Port{{Port: "metrics", Protocol: "TCP"}}, Selectors: nil}, }, ExpectEgress: []olmv0util.EgressRule{ - {Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, Selectors: nil}, + {Ports: []olmv0util.Port{{}}, Selectors: nil}, { Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, Selectors: []olmv0util.Selector{ @@ -336,7 +345,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { {Ports: []olmv0util.Port{{Port: 8443, Protocol: "TCP"}}, Selectors: nil}, }, ExpectEgress: []olmv0util.EgressRule{ - {Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, Selectors: nil}, + {Ports: []olmv0util.Port{{}}, Selectors: nil}, { Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, Selectors: []olmv0util.Selector{ @@ -354,7 +363,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { {Ports: []olmv0util.Port{{Port: 5443, Protocol: "TCP"}}, Selectors: nil}, }, ExpectEgress: []olmv0util.EgressRule{ - {Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, Selectors: nil}, + {Ports: []olmv0util.Port{{}}, Selectors: nil}, { Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, Selectors: []olmv0util.Selector{ @@ -386,7 +395,7 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { {PodLabels: map[string]string{"app": "catalog-operator"}}, }, }, - {Ports: []olmv0util.Port{{Port: 6443, Protocol: "TCP"}}, Selectors: nil}, + {Ports: []olmv0util.Port{{}}, Selectors: nil}, { Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, Selectors: []olmv0util.Selector{ From 38458d19562de7c53ec300c8ed33b10f05f0ed5d Mon Sep 17 00:00:00 2001 From: Kui Wang Date: Thu, 26 Feb 2026 11:17:23 +0800 Subject: [PATCH 2/2] update dns port per new change --- .../test/qe/specs/olmv0_microshift.go | 18 ++-- .../test/qe/specs/olmv0_networkpolicy.go | 90 ++++++++++++------- 2 files changed, 72 insertions(+), 36 deletions(-) diff --git a/tests-extension/test/qe/specs/olmv0_microshift.go b/tests-extension/test/qe/specs/olmv0_microshift.go index a52edea4d8..8c66064b79 100644 --- a/tests-extension/test/qe/specs/olmv0_microshift.go +++ b/tests-extension/test/qe/specs/olmv0_microshift.go @@ -238,10 +238,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 on microshift", g.Label("NonH Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, { Ports: []olmv0util.Port{{Port: 50051, Protocol: "TCP"}}, @@ -274,10 +277,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 on microshift", g.Label("NonH Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "olm-operator"}, diff --git a/tests-extension/test/qe/specs/olmv0_networkpolicy.go b/tests-extension/test/qe/specs/olmv0_networkpolicy.go index 7903083112..db5052f7ab 100644 --- a/tests-extension/test/qe/specs/olmv0_networkpolicy.go +++ b/tests-extension/test/qe/specs/olmv0_networkpolicy.go @@ -56,10 +56,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, { Ports: []olmv0util.Port{{Port: 50051, Protocol: "TCP"}}, @@ -92,10 +95,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "olm-operator"}, @@ -116,10 +122,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "package-server-manager"}, @@ -140,10 +149,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, { Ports: []olmv0util.Port{{Port: 50051, Protocol: "TCP"}}, @@ -178,10 +190,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { Selectors: nil, }, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "olm-collect-profiles"}, @@ -302,10 +317,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { ExpectEgress: []olmv0util.EgressRule{ {Ports: []olmv0util.Port{{}}, Selectors: nil}, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, {Ports: []olmv0util.Port{{Port: 50051, Protocol: "TCP"}}, Selectors: nil}, }, @@ -329,10 +347,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { ExpectEgress: []olmv0util.EgressRule{ {Ports: []olmv0util.Port{{}}, Selectors: nil}, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "olm-operator"}, @@ -347,10 +368,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { ExpectEgress: []olmv0util.EgressRule{ {Ports: []olmv0util.Port{{}}, Selectors: nil}, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "package-server-manager"}, @@ -365,10 +389,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { ExpectEgress: []olmv0util.EgressRule{ {Ports: []olmv0util.Port{{}}, Selectors: nil}, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, {Ports: []olmv0util.Port{{Port: 50051, Protocol: "TCP"}}, Selectors: nil}, }, @@ -397,10 +424,13 @@ var _ = g.Describe("[sig-operator][Jira:OLM] OLMv0 networkpolicy", func() { }, {Ports: []olmv0util.Port{{}}, Selectors: nil}, { - Ports: []olmv0util.Port{{Port: "dns-tcp", Protocol: "TCP"}, {Port: "dns", Protocol: "UDP"}}, - Selectors: []olmv0util.Selector{ - {NamespaceLabels: map[string]string{"kubernetes.io/metadata.name": "openshift-dns"}}, + Ports: []olmv0util.Port{ + {Port: 53, Protocol: "TCP"}, + {Port: 53, Protocol: "UDP"}, + {Port: 5353, Protocol: "TCP"}, + {Port: 5353, Protocol: "UDP"}, }, + Selectors: nil, }, }, ExpectSelector: map[string]string{"app": "olm-collect-profiles"},