@@ -42,8 +42,8 @@ func getControlPlaneVMs(ctx context.Context) []compute.VirtualMachine {
4242 clusterResourceGroup := stringutils .LastTokenByte (* oc .ClusterProfile .ResourceGroupID , '/' )
4343 vms , err := clients .VirtualMachines .List (ctx , clusterResourceGroup )
4444 Expect (err ).NotTo (HaveOccurred ())
45-
4645 return slices .DeleteFunc (vms , func (vm compute.VirtualMachine ) bool {
46+ Expect (vm .Name ).ToNot (BeNil ())
4747 return ! strings .Contains (* vm .Name , "master" )
4848 })
4949}
@@ -54,6 +54,7 @@ func getControlPlaneVMs(ctx context.Context) []compute.VirtualMachine {
5454func getControlPlaneVMSize (ctx context.Context ) string {
5555 vms := getControlPlaneVMs (ctx )
5656 Expect (vms ).NotTo (BeEmpty ())
57+ Expect (vms [0 ].HardwareProfile ).NotTo (BeNil ())
5758 return string (vms [0 ].HardwareProfile .VMSize )
5859}
5960
@@ -198,7 +199,7 @@ var _ = Describe("[Admin API] Resize control plane", func() {
198199 } else if strings .HasPrefix (preResizeVMSize , "Standard_E" ) {
199200 targetSku = strings .Replace (preResizeVMSize , "Standard_E" , "Standard_D" , 1 )
200201 } else {
201- Skip (fmt .Sprintf ("Cowardly refusing to resize the cluster, only know how to hande E and D vms, this cluster has: %s" , preResizeVMSize ))
202+ Skip (fmt .Sprintf ("Cowardly refusing to resize the cluster, only know how to handle E and D vms, this cluster has: %s" , preResizeVMSize ))
202203 }
203204
204205 By (fmt .Sprintf ("Resizing from %s to %s" , preResizeVMSize , targetSku ))
@@ -225,7 +226,7 @@ var _ = Describe("[Admin API] Resize control plane", func() {
225226 Expect (vm .HardwareProfile ).ToNot (BeNil ())
226227 Expect (string (vm .HardwareProfile .VMSize )).To (Equal (targetSku ))
227228 Expect (vm .ProvisioningState ).ToNot (BeNil ())
228- Expect (* vm .ProvisioningState ).ToNot (Equal (string (compute .ProvisioningStateSucceeded )))
229+ Expect (* vm .ProvisioningState ).To (Equal (string (compute .ProvisioningStateSucceeded )))
229230 }
230231
231232 By ("Validating machine and node labels" )
0 commit comments