Merge pull request #656 from vmware-tanzu/fix-credentialissuer-test-flake

Remove an invalid test assertion in TestCredentialIssuer.
This commit is contained in:
Matt Moyer
2021-06-03 12:03:22 -05:00
committed by GitHub

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)