Skip to content

Commit b6b857f

Browse files
committed
Changes to vm-host zonal e2e
1 parent 59a1a5f commit b6b857f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/e2e/vsphere/hostzonal.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,12 @@ func failIfMachineIsNotInCorrectRegionZone(ctx context.Context,
224224
}
225225

226226
if !foundRegion || !foundZone {
227-
Expect(fmt.Errorf("node %s missing expected region '%s' or zone '%s' tags", n.Name, fd.Region, fd.Zone)).NotTo(HaveOccurred())
227+
By(fmt.Sprintf("Node %s (VM: %s) - Region: %s (found: %t), Zone: %s (found: %t)",
228+
n.Name, vm.Name(), fd.Region, foundRegion, fd.Zone, foundZone))
228229
}
230+
231+
Expect(foundRegion).To(BeTrue(), "expected to be in the correct region")
232+
Expect(foundZone).To(BeTrue(), "expected to be in the correct zone")
229233
}
230234
}
231235
}
@@ -294,8 +298,10 @@ func failIfMachineIsNotInCorrectVMGroup(ctx context.Context,
294298

295299
for moRef, v := range foundMoRef {
296300
if !v {
297-
Expect(fmt.Errorf("virtual machine id %s was not in vm group %s", moRef, fd.ZoneAffinity.HostGroup.VMGroup)).NotTo(HaveOccurred())
301+
By(fmt.Sprintf("managed object reference %s, vm group %s", moRef, fd.ZoneAffinity.HostGroup.VMGroup))
298302
}
303+
304+
Expect(v).To(BeTrue(), "expected to find node in vm group")
299305
}
300306
}
301307
}

0 commit comments

Comments
 (0)