Skip to content

Commit

Permalink
test case with nodeReady condition as false
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhairya-Arora01 committed May 29, 2024
1 parent d0f12a1 commit 2e9b3b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions exp/internal/controllers/machinepool_controller_noderef_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ func TestMachinePoolGetNodeReference(t *testing.T) {
},
},
},
&corev1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node-3",
},
Spec: corev1.NodeSpec{
ProviderID: "aws://us-west-2/id-node-3",
},
},
&corev1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "gce-node-2",
Expand Down Expand Up @@ -167,6 +175,17 @@ func TestMachinePoolGetNodeReference(t *testing.T) {
ready: 1,
},
},
{
name: "valid provider id, valid aws node, nodeReady condition set to false",
providerIDList: []string{"aws://us-west-2/id-node-3"},
expected: &getNodeReferencesResult{
references: []corev1.ObjectReference{
{Name: "node-3"},
},
available: 0,
ready: 0,
},
},
{
name: "valid provider id, valid gce node",
providerIDList: []string{"gce://us-central1/gce-id-node-2"},
Expand Down

0 comments on commit 2e9b3b1

Please sign in to comment.