mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
fix case where node exists but shutdown.
This commit is contained in:
parent
78ace24670
commit
3117b6a084
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user