ignore NotFound error

Signed-off-by: Rohan Sharma <rhnsharma5113@gmail.com>
This commit is contained in:
Rohan Sharma 2021-07-05 15:14:23 +05:30
parent 11efaf80ea
commit 1abca3f94a
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ var _ = ginkgo.Describe("[namespace auto-provision] namespace auto-provision tes
err := wait.PollImmediate(pollInterval, pollTimeout, func() (done bool, err error) { err := wait.PollImmediate(pollInterval, pollTimeout, func() (done bool, err error) {
_, err = clusterClient.CoreV1().Namespaces().Get(context.TODO(), namespaceName, metav1.GetOptions{}) _, err = clusterClient.CoreV1().Namespaces().Get(context.TODO(), namespaceName, metav1.GetOptions{})
if err != nil { if err != nil {
if errors.IsNotFound(err) {
return false, nil
}
return false, err return false, err
} }
return true, nil return true, nil