Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openshift/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
bin/
ovn-kubernetes-tests-ext
41 changes: 38 additions & 3 deletions openshift/cmd/ovn-kubernetes-tests-ext/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
"github.com/ovn-kubernetes/ovn-kubernetes/test/e2e/deploymentconfig"
"github.com/ovn-kubernetes/ovn-kubernetes/test/e2e/infraprovider"

// import OTP (OpenShift Tests Private) migration tests
_ "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/otp"

"github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
"github.com/openshift-eng/openshift-tests-extension/pkg/extension"
"github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
Expand Down Expand Up @@ -42,6 +45,28 @@ const (
featureLabelNetworkSegmentation = "Feature:NetworkSegmentation"
)

// otpBlockingTests lists the substring patterns for OTP tests that should be blocking
var otpBlockingTests = []string{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SachinNinganure Thanks. lets hold on making tests blocking. Lets make all informing for now.

"should not expose API tokens in ovnkube-node logs",
"should have secure permissions on CNI configuration files",
"should handle large IPv6 exclude ranges without timeout",
"should support Dummy CNI plugin with Multus",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multus tests should go in openshift/multus-cni repo. SO I guess we all need to carefully look at our sheets/tasks and not assume default that everything shall go in openshift/ovn-kubernetes repo.

In this list it seems Whereabouts IPAM and CI Plugin with multus are only 2 cases which belongs to openshift/multus-cni repo

@anuragthehatter anuragthehatter Jun 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are a contributor to openshift/multus-cni#303. You can clone it and keep adding .You can add musltus cases there and
we can test with its registered origin binary openshift/origin#31231 (you are also contributor there). Happy to chat more on this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also apparently some cases might belongs to https://github.com/openshift/network-tools as well. So your cases here belongs to 3 repos here IMO.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multus tests should go in openshift/multus-cni repo. SO I guess we all need to carefully look at our sheets/tasks and not assume default that everything shall go in openshift/ovn-kubernetes repo.

In this list it seems Whereabouts IPAM and CI Plugin with multus are only 2 cases which belongs to openshift/multus-cni repo

Added the 4 Multus test cases to PR #303 framework
Tested them on live cluster (all PASS)
Created PR: anuragthehatter/multus-cni#1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also apparently some cases might belongs to https://github.com/openshift/network-tools as well. So your cases here belongs to 3 repos here IMO.

openshift/network-tools - Security and tools tests (5 tests) TODO
OCP-49216: API token logging security
OCP-77102: CNI file permissions
OCP-55889: ovn-db-run-command script
OCP-67625: ovnkube-trace pod-to-pod
OCP-67648: ovnkube-trace pod-to-hostnetworkpod

"should execute ovn-db-run-command script successfully",
"should create healthy pod with single-stack gateway on dual-stack cluster",
"should show aggregated status from all zones in AdminPolicyBasedExternalRoute",
"should assign dual-stack IPs with Whereabouts IPAM",
}

// isOTPBlocking checks if an OTP test should be marked as blocking
func isOTPBlocking(name string) bool {
for _, title := range otpBlockingTests {
if strings.Contains(name, title) {
return true
}
}
return false
}

// shouldIncludeTest determines if a test should be included based on cluster capabilities
// and test labels. When ocpInfra is nil (no cluster access), all tests are included.
func shouldIncludeTest(spec *extensiontests.ExtensionTestSpec) bool {
Expand Down Expand Up @@ -136,8 +161,12 @@ func main() {
blockingTests := sets.New(test.BlockingTests...)

specs.Walk(func(spec *extensiontests.ExtensionTestSpec) {
for _, label := range getTestExtensionLabels() {
spec.Labels.Insert(label)
isOTP := strings.Contains(spec.Name, "[OTP]")

if !isOTP {
for _, label := range getTestExtensionLabels() {
spec.Labels.Insert(label)
}
}

// Exclude Network Segmentation tests on SingleReplica topology (e.g., MicroShift, SNO)
Expand All @@ -155,9 +184,15 @@ func main() {
spec.Labels.Insert(label)
}

spec.Name = generatePrependedLabelsStr(spec.Labels) + " " + spec.Name // prepend ginkgo labels to test name
if !isOTP {
spec.Name = generatePrependedLabelsStr(spec.Labels) + " " + spec.Name // prepend ginkgo labels to test name
}

switch {
case isOTP && isOTPBlocking(spec.Name):
spec.Lifecycle = extensiontests.LifecycleBlocking
case isOTP:
spec.Lifecycle = extensiontests.LifecycleInforming
case informingTests.Has(spec.Name):
spec.Lifecycle = extensiontests.LifecycleInforming
case blockingTests.Has(spec.Name):
Expand Down
3 changes: 3 additions & 0 deletions openshift/test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import (
// import OVN-Kubernetes E2Es
_ "github.com/ovn-kubernetes/ovn-kubernetes/test/e2e"

// import OTP (OpenShift Tests Private) migration tests
_ "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/otp"

// Ensure that logging flags are part of the command line.
_ "k8s.io/component-base/logs/testinit"
)
Expand Down
Loading