From 96d6ca84834140cdc3dfb96cf54a6078dced6511 Mon Sep 17 00:00:00 2001 From: Dainius Serplis Date: Fri, 15 Nov 2024 11:56:19 +0200 Subject: [PATCH] Improve cleanup Signed-off-by: Dainius Serplis --- govcd/api_vcd_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/govcd/api_vcd_test.go b/govcd/api_vcd_test.go index db6f1ea5b..9e00b7797 100644 --- a/govcd/api_vcd_test.go +++ b/govcd/api_vcd_test.go @@ -961,6 +961,11 @@ func (vcd *TestVCD) removeLeftoverEntities(entity CleanupEntity) { vcd.infoCleanup(removedMsg, entity.EntityType, entity.Name, entity.CreatedBy) case "OpenApiEntityVcenter": vc, err := vcd.client.GetVCenterByName(entity.Name) + if ContainsNotFound(err) { + vcd.infoCleanup(notFoundMsg, entity.EntityType, entity.Name) + return + } + if err != nil { vcd.infoCleanup(notDeletedMsg, entity.EntityType, entity.Name, err) return