@@ -2049,11 +2049,10 @@ func TestKubeadmControlPlaneReconciler_setLastRemediation(t *testing.T) {
2049
2049
err = setLastRemediation (ctx , controlPlane )
2050
2050
g .Expect (err ).ToNot (HaveOccurred ())
2051
2051
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 )))
2057
2056
})
2058
2057
t .Run ("Remediation completed, get data from past remediation" , func (t * testing.T ) {
2059
2058
g := NewWithT (t )
@@ -2082,11 +2081,10 @@ func TestKubeadmControlPlaneReconciler_setLastRemediation(t *testing.T) {
2082
2081
err = setLastRemediation (ctx , controlPlane )
2083
2082
g .Expect (err ).ToNot (HaveOccurred ())
2084
2083
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 )))
2090
2088
})
2091
2089
}
2092
2090
0 commit comments