Scale windows VM bug: catch error for len(vms) < 1
* add win config to tests
* catch 0 vms error
* Revert "add win config to tests"
This reverts commit
* rm comment
@@ -188,6 +188,8 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error {
vms, err := sc.client.ListVirtualMachines(sc.resourceGroupName)
if err != nil {
log.Fatalln("failed to get vms in the resource group. Error: %s", err.Error())
+ } else if len(*vms.Value) < 1 {
+ log.Fatalln("The provided resource group does not contain any vms.")
}
for _, vm := range *vms.Value {
