From 3260bbf22a5d878d8545e5a371c89bcf788355f4 Mon Sep 17 00:00:00 2001 From: Himanshu Sharma Date: Tue, 3 Oct 2023 12:38:33 +0530 Subject: [PATCH] changes made to unit tests --- .../cloudprovider/mcm/mcm_cloud_provider_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/mcm/mcm_cloud_provider_test.go b/cluster-autoscaler/cloudprovider/mcm/mcm_cloud_provider_test.go index 42799092ec2a..c78edf65ea76 100644 --- a/cluster-autoscaler/cloudprovider/mcm/mcm_cloud_provider_test.go +++ b/cluster-autoscaler/cloudprovider/mcm/mcm_cloud_provider_test.go @@ -422,10 +422,10 @@ func TestRefresh(t *testing.T) { // Different kinds of cases possible and expected cloudprovider.Instance returned for them // (mobj, mobjPid, nodeobj) -> instance(nodeobj.pid,_) -// (mobj, mobjPid, _) -> instance("requested://",status{'creating'}) -// (mobj, _,_) -> instance("requested://",status{'creating'}) +// (mobj, mobjPid, _) -> instance("requested://",_) +// (mobj, _,_) -> instance("requested://",_) // (mobj, _,_) with quota error -> instance("requested://",status{'creating',{'outofResourcesClass','ResourceExhausted',''}}) -// (mobj, _,_) with invalid credentials error -> instance("requested://",status{'creating'}) +// (mobj, _,_) with invalid credentials error -> instance("requested://",_) // Example machine.status.lastOperation for a `ResourceExhausted` error // @@ -477,11 +477,11 @@ func TestNodes(t *testing.T) { expect{ expectationPerInstanceList: []expectationPerInstance{ {"fakeID-1", cloudprovider.InstanceState(-1), cloudprovider.InstanceErrorClass(-1), "", ""}, - {placeholderInstanceIDForMachineObj("machine-with-vm-but-no-node"), cloudprovider.InstanceCreating, cloudprovider.InstanceErrorClass(-1), "", ""}, - {placeholderInstanceIDForMachineObj("machine-with-vm-creating"), cloudprovider.InstanceCreating, cloudprovider.InstanceErrorClass(-1), "", ""}, + {placeholderInstanceIDForMachineObj("machine-with-vm-but-no-node"), cloudprovider.InstanceState(-1), cloudprovider.InstanceErrorClass(-1), "", ""}, + {placeholderInstanceIDForMachineObj("machine-with-vm-creating"), cloudprovider.InstanceState(-1), cloudprovider.InstanceErrorClass(-1), "", ""}, {placeholderInstanceIDForMachineObj("machine-with-vm-create-error-out-of-quota"), cloudprovider.InstanceCreating, cloudprovider.OutOfResourcesErrorClass, machinecodes.ResourceExhausted.String(), outOfQuotaInstanceErrorMessage}, // invalid credentials error is mapped to Internal code as it can't be fixed by trying another zone - {placeholderInstanceIDForMachineObj("machine-with-vm-create-error-invalid-credentials"), cloudprovider.InstanceCreating, cloudprovider.InstanceErrorClass(-1), "", ""}, + {placeholderInstanceIDForMachineObj("machine-with-vm-create-error-invalid-credentials"), cloudprovider.InstanceState(-1), cloudprovider.InstanceErrorClass(-1), "", ""}, }, }, },