Wait for successful TCR in TestImpersonationProxy.

This test setup should tolerate when the TokenCredentialRequest API isn't quite ready to authenticate the user or issue a cert.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2021-05-27 13:03:07 -05:00
parent 349d3dad83
commit 67d5c91713
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D

View File

@ -142,7 +142,7 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
t.Logf("failed to make TokenCredentialRequest: %s", library.Sdump(err))
return false
}
return true
return mostRecentTokenCredentialRequestResponse.Status.Credential != nil
}, 5*time.Minute, 5*time.Second)
require.Nil(t, mostRecentTokenCredentialRequestResponse.Status.Message,