-
Notifications
You must be signed in to change notification settings - Fork 197
OTE: migrate OTP tests: Tools and multus test cases #3213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 12 commits
3821003
68e19f0
60c10a2
d65249b
c9d8ba8
eda4d88
cd76ac5
e3ab5e9
d6cce26
c288959
0d83675
4aaea6f
e6f46f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| vendor/ | ||
| bin/ | ||
| ovn-kubernetes-tests-ext |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
|
|
@@ -42,6 +45,28 @@ const ( | |
| featureLabelNetworkSegmentation = "Feature:NetworkSegmentation" | ||
| ) | ||
|
|
||
| // otpBlockingTests lists the substring patterns for OTP tests that should be blocking | ||
| var otpBlockingTests = []string{ | ||
| "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", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Added the 4 Multus test cases to PR #303 framework
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
openshift/network-tools - Security and tools tests (5 tests) TODO |
||
| "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 { | ||
|
|
@@ -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) | ||
|
|
@@ -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): | ||
|
|
||
There was a problem hiding this comment.
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.