e2e framework: better error when service account creation times out

When waiting for the default service account in a new namespace, not finding
one was reported as "unexpected error: timed out waiting for the condition"...
This commit is contained in:
Patrick Ohly 2022-09-16 09:01:42 +02:00
parent 178f246bbc
commit efc172f4bf

View File

@ -328,7 +328,10 @@ func waitForServiceAccountInNamespace(c clientset.Interface, ns, serviceAccountN
}
return false, nil
})
return err
if err != nil {
return fmt.Errorf("wait for service account %q in namespace %q: %w", serviceAccountName, ns, err)
}
return nil
}
// WaitForDefaultServiceAccountInNamespace waits for the default service account to be provisioned