Skip to content

Commit

Permalink
Merge pull request #82 from n1r1/fix-ut
Browse files Browse the repository at this point in the history
Fix failing unit tests in actuator remediation test
  • Loading branch information
openshift-merge-robot committed Jul 9, 2020
2 parents 657bc27 + 9d730e3 commit a6bf9e1
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions pkg/cloud/baremetal/actuators/machine/actuator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1778,18 +1778,6 @@ func TestRemediation(t *testing.T) {
}
}

err = actuator.Update(context.TODO(), machine)
if err == nil {
t.Errorf("expected a requeue err but err was nil")
} else {
switch err.(type) {
case *machineapierrors.RequeueAfterError:
break
default:
t.Errorf("unexpected error %v", err)
}
}

node = &corev1.Node{}
err = c.Get(context.TODO(), nodeNamespacedName, node)
if !errors.IsNotFound(err) {
Expand All @@ -1802,6 +1790,8 @@ func TestRemediation(t *testing.T) {
//from k8s to do
now := metav1.Now()
nodeBackup.SetDeletionTimestamp(&now)

nodeBackup.ResourceVersion = "" //create won't work with non empty ResourceVersion
c.Create(context.TODO(), nodeBackup)

err = actuator.Update(context.TODO(), machine)
Expand Down

0 comments on commit a6bf9e1

Please sign in to comment.