mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
test/integration/apiserver/cel: update createAndWaitReady to retry on error including 'not yet synced to use for admission'
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
This commit is contained in:
parent
7127f565f6
commit
34a2d265d7
@ -1933,6 +1933,9 @@ func createAndWaitReady(t *testing.T, client *clientset.Clientset, binding *admi
|
||||
_, err := client.CoreV1().Endpoints("default").Patch(context.TODO(), marker.Name, types.JSONPatchType, []byte("[]"), metav1.PatchOptions{})
|
||||
if err != nil && strings.Contains(err.Error(), "marker denied; policy is ready") {
|
||||
return true, nil
|
||||
} else if err != nil && strings.Contains(err.Error(), "not yet synced to use for admission") {
|
||||
t.Logf("waiting for policy to be ready. Marker: %v. Admission not synced yet: %v", marker, err)
|
||||
return false, nil
|
||||
} else {
|
||||
t.Logf("waiting for policy to be ready. Marker: %v, Last marker patch response: %v", marker, err)
|
||||
return false, err
|
||||
|
Loading…
Reference in New Issue
Block a user