From 9baecdfd58dfc28430c35b3523aea8dd419417f0 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Mon, 8 Jul 2024 16:32:03 +0545 Subject: [PATCH] fix: return early if the ocis is not running --- tests/ociswrapper/ocis/ocis.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ociswrapper/ocis/ocis.go b/tests/ociswrapper/ocis/ocis.go index 0ca824326..ca8befa1d 100644 --- a/tests/ociswrapper/ocis/ocis.go +++ b/tests/ociswrapper/ocis/ocis.go @@ -117,6 +117,10 @@ func Stop() (bool, string) { log.Println("Stopping oCIS server...") stopSignal = true + if cmd == nil { + return true, "oCIS server is not running" + } + err := cmd.Process.Signal(syscall.SIGINT) if err != nil { if !strings.HasSuffix(err.Error(), "process already finished") {