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:
Matt Moyer 2021-06-02 12:02:34 -05:00
parent 87660611d2
commit 0e66b0b165
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
1 changed files with 0 additions and 10 deletions

View File

@ -87,16 +87,6 @@ func TestCredentialIssuer(t *testing.T) {
},
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 {
require.Equal(t, configv1alpha1.ErrorStrategyStatus, actualStatusStrategy.Status)
require.Equal(t, configv1alpha1.CouldNotFetchKeyStrategyReason, actualStatusStrategy.Reason)