Skip to content

Commit

Permalink
ci: Adapt uninstall tests after rancher/elemental-operator#775
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Jun 27, 2024
1 parent dba9c98 commit d19d709
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/e2e/uninstall-operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var _ = Describe("E2E - Uninstall Elemental Operator", Label("uninstall-operator
}(clusterNS, clusterName)

// Removing finalizers from MachineInventory and Machine
By("Removing finalizers from MachineInventory/Machine", func() {
By("Removing finalizers from MachineInventory/Machine and ManagedOsVersion", func() {
// NOTE: wait a bit for the cluster deletion to be started (it's running in background)
time.Sleep(1 * time.Minute)

Expand All @@ -135,6 +135,16 @@ var _ = Describe("E2E - Uninstall Elemental Operator", Label("uninstall-operator
deleteFinalizers(clusterNS, "Machine", internalMachine)
}
}

mOSList, err := kubectl.RunWithoutErr("get", "ManagedOSVersion",
"--namespace", clusterNS, "-o", "jsonpath={.items[*].metadata.name}")
Expect(err).To(Not(HaveOccurred()))

for _, mOS := range strings.Fields(mOSList) {
// Delete blocking Finalizers
GinkgoWriter.Printf("Deleting Finalizers for ManagedOSVersion '%s'...\n", mOS)
deleteFinalizers(clusterNS, "ManagedOSVersion", mOS)
}
})

// Wait for cluster deletion to be completed
Expand Down

0 comments on commit d19d709

Please sign in to comment.