Fix flaky rename test
If the controller needs a little bit longer than usual to delete the old
VM, one can still observe the olf VM for some time until it is finally
gone. Retry a few times to see if the old VM will disappear as expected.
@@ -1729,9 +1729,12 @@ var _ = Describe("[rfe_id:1177][crit:medium][vendor:cnv-qe@redhat.com][level:com
return err
}, 10*time.Second, 1*time.Second).Should(BeNil())
+ Eventually(func() error {
_, err = cli.Get(vm1.Name, &v12.GetOptions{})
- Expect(err).To(HaveOccurred())
- Expect(err.Error()).To(ContainSubstring("not found"))
+
+ return err
+ }, 10*time.Second, 1*time.Second).Should(HaveOccurred())
+ Expect(errors.IsNotFound(err)).To(BeTrue())
})
})
})
