Remove an invalid test assertion in TestCredentialIssuer.
The LastUpdateTime is no longer updated on every resync. It only changes if the underlying status has changed, so that it effectively shows when the transition happened.
This change happened in ab750f48aa
, but we missed this test. It only fails when it has been more than ten minutes since the CredentialIssuer transitioned into a healthy state, but that can happen in our long-running CI environments.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
87660611d2
commit
0e66b0b165
@ -87,16 +87,6 @@ func TestCredentialIssuer(t *testing.T) {
|
|||||||
},
|
},
|
||||||
actualStatusKubeConfigInfo,
|
actualStatusKubeConfigInfo,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Only validate LastUpdateTime when cluster signing key is available. The last update time
|
|
||||||
// will be set every time our controllers resync, but only when there exists controller
|
|
||||||
// manager pods (all other pods will be filtered out), hence why this assertion is in this
|
|
||||||
// if branch.
|
|
||||||
//
|
|
||||||
// This behavior is up for debate. We should eventually discuss the contract for this
|
|
||||||
// LastUpdateTime field and ensure that the implementation is the same for when the cluster
|
|
||||||
// signing key is available and not available.
|
|
||||||
require.WithinDuration(t, time.Now(), actualStatusStrategy.LastUpdateTime.Local(), 10*time.Minute)
|
|
||||||
} else {
|
} else {
|
||||||
require.Equal(t, configv1alpha1.ErrorStrategyStatus, actualStatusStrategy.Status)
|
require.Equal(t, configv1alpha1.ErrorStrategyStatus, actualStatusStrategy.Status)
|
||||||
require.Equal(t, configv1alpha1.CouldNotFetchKeyStrategyReason, actualStatusStrategy.Reason)
|
require.Equal(t, configv1alpha1.CouldNotFetchKeyStrategyReason, actualStatusStrategy.Reason)
|
||||||
|
Loading…
Reference in New Issue
Block a user