From d4be6a83a7c4e2fa094f6f7fcbfac865aa8c7845 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Thu, 21 Sep 2023 17:00:29 +0545 Subject: [PATCH] ociswrapper: break wait if server responds with 200 --- tests/ociswrapper/ocis/ocis.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/ociswrapper/ocis/ocis.go b/tests/ociswrapper/ocis/ocis.go index a38f4b8168..0d9ff319b2 100644 --- a/tests/ociswrapper/ocis/ocis.go +++ b/tests/ociswrapper/ocis/ocis.go @@ -120,11 +120,7 @@ func WaitForConnection() bool { req.Header.Set("X-Request-ID", "ociswrapper-"+strconv.Itoa(int(time.Now().UnixMilli()))) res, err := client.Do(req) - if err != nil || res.StatusCode >= 400 { - if res != nil { - log.Println(fmt.Sprintf("oCIS server up but request failed: %v", res.StatusCode)) - return true - } + if err != nil || res.StatusCode != 200 { // 500 milliseconds poll interval time.Sleep(500 * time.Millisecond) continue