Skip to content

Commit

Permalink
ci: add workaround for issue #515
Browse files Browse the repository at this point in the history
Signed-off-by: Loic Devulder <[email protected]>
  • Loading branch information
ldevulder committed Sep 26, 2023
1 parent 5f9c0d8 commit baac51a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/e2e/uninstall-operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ var _ = Describe("E2E - Uninstall Elemental Operator", Label("uninstall-operator
}, tools.SetTimeout(3*time.Minute), 5*time.Second).Should(ContainSubstring("NotFound"))
})

By("WORKAROUND: Removing finalizers from MachineInventory", func() {
machineList, err := kubectl.Run("get", "MachineInventory",
"--namespace", clusterNS, "-o", "jsonpath={.items[*].metadata.name}")
Expect(err).To(Not(HaveOccurred()))

// Removing finalizers from MachineInventory
for _, machine := range strings.Fields(machineList) {
_, err := kubectl.Run("patch", "MachineInventory",
"--namespace", clusterNS, "--type", "merge",
"-p", "'{\"metadata\":{\"finalizers\":null}}'",
machine)
Expect(err).To(Not(HaveOccurred()))
}
})

By("Deleting cluster resource", func() {
Eventually(func() error {
_, err := kubectl.Run("delete", "cluster",
Expand Down

0 comments on commit baac51a

Please sign in to comment.