Remove WaitForVMCondition functions
These are replaced by matcher
@@ -2093,34 +2093,6 @@ func WaitForVMIConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vmi *v
}, time.Duration(timeoutSec)*time.Second, 2).Should(BeFalse(), fmt.Sprintf("Should have no or false %s condition", conditionType))
}
-func WaitForVMCondition(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, conditionType v1.VirtualMachineConditionType, timeoutSec int) {
- By(fmt.Sprintf("Waiting for %s condition", conditionType))
- EventuallyWithOffset(1, func() bool {
- updatedVm, err := virtClient.VirtualMachine(util2.NamespaceTestDefault).Get(vm.Name, &metav1.GetOptions{})
- Expect(err).ToNot(HaveOccurred())
- for _, condition := range updatedVm.Status.Conditions {
- if condition.Type == conditionType && condition.Status == k8sv1.ConditionTrue {
- return true
- }
- }
- return false
- }, time.Duration(timeoutSec)*time.Second, 2).Should(BeTrue(), fmt.Sprintf("Should have %s condition", conditionType))
-}
-
-func WaitForVMConditionRemovedOrFalse(virtClient kubecli.KubevirtClient, vm *v1.VirtualMachine, conditionType v1.VirtualMachineConditionType, timeoutSec int) {
- By(fmt.Sprintf("Waiting for %s condition removed or false", conditionType))
- EventuallyWithOffset(1, func() bool {
- updatedVm, err := virtClient.VirtualMachine(util2.NamespaceTestDefault).Get(vm.Name, &metav1.GetOptions{})
- Expect(err).ToNot(HaveOccurred())
- for _, condition := range updatedVm.Status.Conditions {
- if condition.Type == conditionType && condition.Status == k8sv1.ConditionTrue {
- return true
- }
- }
- return false
- }, time.Duration(timeoutSec)*time.Second, 2).Should(BeFalse(), fmt.Sprintf("Should have no or false %s condition", conditionType))
-}
-
// GeneratePrivateKey creates a RSA Private Key of specified byte size
func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error) {
privateKey, err := rsa.GenerateKey(cryptorand.Reader, bitSize)
