From 5ea5a8dddba92dcd2299d2cdc276896db64002d7 Mon Sep 17 00:00:00 2001 From: "v.scharf" Date: Tue, 21 Apr 2026 13:57:17 +0200 Subject: [PATCH] return waitAllServices --- tests/ocwrapper/opencloud/opencloud.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/ocwrapper/opencloud/opencloud.go b/tests/ocwrapper/opencloud/opencloud.go index fcd822c494..6b5d22fcbe 100644 --- a/tests/ocwrapper/opencloud/opencloud.go +++ b/tests/ocwrapper/opencloud/opencloud.go @@ -153,7 +153,24 @@ func IsOpencloudRunning() bool { return false } +func waitAllServices(startTime time.Time, timeout time.Duration) { + timeoutS := timeout * time.Second + + c := exec.Command(config.Get("bin"), "list") + _, err := c.CombinedOutput() + if err != nil { + if time.Since(startTime) <= timeoutS { + time.Sleep(500 * time.Millisecond) + waitAllServices(startTime, timeout) + } + return + } + log.Println("All services are up") +} + func WaitForConnection() (bool, string) { + waitAllServices(time.Now(), 30) + transport := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, }