Skip to content

Commit 86bce54

Browse files
committed
Update vsphere vm-host zonal e2e logging
This commit changes the expected output to not include the topology of the infra. That output has been moved to By()
1 parent 59a1a5f commit 86bce54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/e2e/vsphere/hostzonal.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,10 @@ func failIfMachineIsNotInCorrectRegionZone(ctx context.Context,
223223
}
224224
}
225225

226-
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())
228-
}
226+
By(fmt.Sprintf("Node %s (VM: %s) - Region: %s (found: %t), Zone: %s (found: %t)",
227+
n.Name, vm.Name(), fd.Region, foundRegion, fd.Zone, foundZone))
228+
229+
Expect(foundRegion && foundZone).To(BeTrue(), "expected vm to be in the correct region and zone")
229230
}
230231
}
231232
}
@@ -293,9 +294,8 @@ func failIfMachineIsNotInCorrectVMGroup(ctx context.Context,
293294
}
294295

295296
for moRef, v := range foundMoRef {
296-
if !v {
297-
Expect(fmt.Errorf("virtual machine id %s was not in vm group %s", moRef, fd.ZoneAffinity.HostGroup.VMGroup)).NotTo(HaveOccurred())
298-
}
297+
By(fmt.Sprintf("managed object reference %s, vm group %s", moRef, fd.ZoneAffinity.HostGroup.VMGroup))
298+
Expect(v).To(BeTrue(), "expected to find node in vm group")
299299
}
300300
}
301301
}

0 commit comments

Comments
 (0)