Skip to content

Commit

Permalink
Merge pull request #2899 from chrischdi/pr-e2e-ip-teardown-best-effort
Browse files Browse the repository at this point in the history
🌱 test: teardown ipam only on best-effort base to not fail successful tests
  • Loading branch information
k8s-ci-robot authored Apr 9, 2024
2 parents 61e3634 + ef747b0 commit daa233c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ var _ = SynchronizedAfterSuite(func() {
case VCenterTestTarget:
// Cleanup the in cluster address manager
vSphereFolderName := e2eConfig.GetVariable("VSPHERE_FOLDER")
Expect(inClusterAddressManager.Teardown(ctx, vsphereip.MachineFolder(vSphereFolderName), vsphereip.VSphereClient(vsphereClient))).To(Succeed())
err := inClusterAddressManager.Teardown(ctx, vsphereip.MachineFolder(vSphereFolderName), vsphereip.VSphereClient(vsphereClient))
if err != nil {
Byf("Ignoring Teardown error: %v", err)
}

case VCSimTestTarget:
// Cleanup the vcsim address manager
Expand Down
4 changes: 2 additions & 2 deletions test/framework/ip/incluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ func getVirtualMachineIPAddresses(ctx context.Context, folderName string, vSpher
// Find the given folder.
folder, err := finder.FolderOrDefault(ctx, folderName)
if err != nil {
return nil, err
return nil, errors.Wrap(err, "getting default folder")
}

// List all VirtualMachines in the folder.
managedObjects, err := finder.ManagedObjectListChildren(ctx, folder.InventoryPath+"/...", "VirtualMachine")
if err != nil {
return nil, err
return nil, errors.Wrap(err, "finding VirtualMachines")
}

var vm mo.VirtualMachine
Expand Down

0 comments on commit daa233c

Please sign in to comment.