Skip to content

Commit f0f319c

Browse files
committed
Make fake node as ready but unschedulable
1 parent c25f5ee commit f0f319c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/e2e/node/node_lifecycle.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,21 @@ var _ = SIGDescribe("Node Lifecycle", func() {
5353

5454
nodeClient := f.ClientSet.CoreV1().Nodes()
5555

56+
// Create a fake node with a ready condition but unschedulable, so it won't be selected by
57+
// the scheduler and won't be deleted by the cloud controller manager when the test runs on
58+
// a specific cloud provider.
5659
fakeNode := v1.Node{
5760
ObjectMeta: metav1.ObjectMeta{
5861
Name: "e2e-fake-node-" + utilrand.String(5),
5962
},
63+
Spec: v1.NodeSpec{
64+
Unschedulable: true,
65+
},
6066
Status: v1.NodeStatus{
6167
Phase: v1.NodeRunning,
6268
Conditions: []v1.NodeCondition{
6369
{
64-
Status: v1.ConditionFalse,
70+
Status: v1.ConditionTrue,
6571
Message: "Set from e2e test",
6672
Reason: "E2E",
6773
Type: v1.NodeReady,

0 commit comments

Comments
 (0)