diff --git a/pkg/controller/cloud/node_lifecycle_controller_test.go b/pkg/controller/cloud/node_lifecycle_controller_test.go index 9db1cfd4505..6188e75fb40 100644 --- a/pkg/controller/cloud/node_lifecycle_controller_test.go +++ b/pkg/controller/cloud/node_lifecycle_controller_test.go @@ -275,7 +275,7 @@ func Test_NodesShutdown(t *testing.T) { updatedNodes []*v1.Node }{ { - name: "node is not ready and was shutdown", + name: "node is not ready and was shutdown, but exists", fnh: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { @@ -283,6 +283,9 @@ func Test_NodesShutdown(t *testing.T) { Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.Local), }, + Spec: v1.NodeSpec{ + ProviderID: "node0", + }, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -300,6 +303,7 @@ func Test_NodesShutdown(t *testing.T) { }, fakeCloud: &fakecloud.Cloud{ NodeShutdown: true, + ExistsByProviderID: true, ErrShutdownByProviderID: nil, }, updatedNodes: []*v1.Node{ @@ -309,6 +313,7 @@ func Test_NodesShutdown(t *testing.T) { CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.Local), }, Spec: v1.NodeSpec{ + ProviderID: "node0", Taints: []v1.Taint{ *ShutdownTaint, },