concierge_impersonation_proxy_test.go: add an eventually loop
Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
parent
f5fedbb6b2
commit
7a140bf63c
@ -128,8 +128,10 @@ func TestImpersonationProxy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check that we can't use the impersonation proxy to execute kubectl commands again
|
// Check that we can't use the impersonation proxy to execute kubectl commands again
|
||||||
|
require.Eventually(t, func() bool {
|
||||||
_, err = impersonationProxyClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{})
|
_, err = impersonationProxyClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{})
|
||||||
require.EqualError(t, err, serviceUnavailableError)
|
return err.Error() == serviceUnavailableError
|
||||||
|
}, 10*time.Second, 500*time.Millisecond)
|
||||||
|
|
||||||
if env.HasCapability(library.HasExternalLoadBalancerProvider) {
|
if env.HasCapability(library.HasExternalLoadBalancerProvider) {
|
||||||
// the load balancer should not exist after we disable the impersonation proxy
|
// the load balancer should not exist after we disable the impersonation proxy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user