You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate OCP-67564: node drain should block when PodDisruptionBudget minAvailable equals 100%
Migrates test from openshift-tests-private to origin.
Test validates that node drain is properly blocked when a
PodDisruptionBudget has minAvailable=100% with an empty selector.
The test:
1. Creates a deployment with 1 replica
2. Creates a PodDisruptionBudget with minAvailable=100% and empty selector
3. Attempts to drain a node
4. Verifies the drain operation is blocked
5. Deletes the PDB and verifies drain succeeds
This is a disruptive test marked as informing.
Updates:
- Add test to test/extended/node/node_e2e/node.go
- Add helper functions to test/extended/node/node_utils.go:
- GetSingleWorkerNode: retrieves a worker node name
- WaitClusterOperatorAvailable: waits for cluster operators to be available
- Document test in test/extended/node/README.md
Relates: https://issues.redhat.com/browse/OCPBUGS-15035
Copy file name to clipboardExpand all lines: test/extended/node/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ This directory contains OpenShift end-to-end tests for node-related features.
19
19
-**image_volume.go** - Tests mounting container images as volumes in pods, including subPath and error handling
20
20
-**node_swap.go** - Tests default kubelet swap settings (failSwapOn and swapBehavior) and rejection of user overrides
21
21
-**zstd_chunked.go** - Tests building and running images with zstd:chunked compression format
22
+
-**node_e2e/node.go** - PodDisruptionBudget drain blocking (OCP-67564) - Tests that node drain is blocked when PDB has minAvailable=100% with empty selector [Disruptive][Lifecycle:informing]
g.It("[OTP] node's drain should block when PodDisruptionBudget minAvailable equals 100 percentage and selector is empty [Disruptive] [OCP-67564]", ote.Informing(), func() {
177
+
ctx:=context.Background()
178
+
179
+
// Skip on SNO/External topologies where there might not be dedicated worker nodes
o.Expect(err).To(o.HaveOccurred(), "drain operation should have been blocked but it wasn't")
311
+
o.Expect(strings.Contains(out, "Cannot evict pod as it would violate the pod's disruption budget")).Should(o.BeTrue(), "drain output missing PDB violation error message")
312
+
o.Expect(strings.Contains(out, "There are pending nodes to be drained")).Should(o.BeTrue(), "drain output missing pending nodes error message")
313
+
314
+
g.By("Verify that the pods were not drained from the node")
0 commit comments