Skip to content

Commit fe3f8bf

Browse files
Fix CI error
1 parent 0a5c2bd commit fe3f8bf

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

controlplane/kubeadm/internal/controllers/status_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,11 +2049,10 @@ func TestKubeadmControlPlaneReconciler_setLastRemediation(t *testing.T) {
20492049
err = setLastRemediation(ctx, controlPlane)
20502050
g.Expect(err).ToNot(HaveOccurred())
20512051

2052-
g.Expect(controlPlane.KCP.Status.LastRemediation).To(Equal(&controlplanev1.LastRemediationStatus{
2053-
Machine: r1.Machine,
2054-
Timestamp: r1.Timestamp,
2055-
RetryCount: int32(r1.RetryCount),
2056-
}))
2052+
g.Expect(controlPlane.KCP.Status.LastRemediation).ToNot(BeNil())
2053+
g.Expect(controlPlane.KCP.Status.LastRemediation.Machine).To(Equal(r1.Machine))
2054+
g.Expect(controlPlane.KCP.Status.LastRemediation.Timestamp).To(Equal(r1.Timestamp))
2055+
g.Expect(controlPlane.KCP.Status.LastRemediation.RetryCount).To(Equal(int32(r1.RetryCount)))
20572056
})
20582057
t.Run("Remediation completed, get data from past remediation", func(t *testing.T) {
20592058
g := NewWithT(t)
@@ -2082,11 +2081,10 @@ func TestKubeadmControlPlaneReconciler_setLastRemediation(t *testing.T) {
20822081
err = setLastRemediation(ctx, controlPlane)
20832082
g.Expect(err).ToNot(HaveOccurred())
20842083

2085-
g.Expect(controlPlane.KCP.Status.LastRemediation).To(Equal(&controlplanev1.LastRemediationStatus{
2086-
Machine: r2.Machine,
2087-
Timestamp: r2.Timestamp,
2088-
RetryCount: int32(r2.RetryCount),
2089-
}))
2084+
g.Expect(controlPlane.KCP.Status.LastRemediation).ToNot(BeNil())
2085+
g.Expect(controlPlane.KCP.Status.LastRemediation.Machine).To(Equal(r2.Machine))
2086+
g.Expect(controlPlane.KCP.Status.LastRemediation.Timestamp).To(Equal(r2.Timestamp))
2087+
g.Expect(controlPlane.KCP.Status.LastRemediation.RetryCount).To(Equal(int32(r2.RetryCount)))
20902088
})
20912089
}
20922090

0 commit comments

Comments
 (0)