From f22a6498264ac228ec14521912544fb9e9b2fb5c Mon Sep 17 00:00:00 2001 From: Arik Hadas Date: Tue, 5 Dec 2023 18:41:23 +0200 Subject: [PATCH] minor cleanup Signed-off-by: Arik Hadas --- tests/suit/framework/ova.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/suit/framework/ova.go b/tests/suit/framework/ova.go index c7b995d28..b0a068bb9 100644 --- a/tests/suit/framework/ova.go +++ b/tests/suit/framework/ova.go @@ -28,7 +28,6 @@ func (r *OvaClient) GetNfsServerForOva(k8sClient *kubernetes.Clientset) (string, if err != nil { return "", err } - var nfsShare string var server, share string for parm, val := range storageClass.Parameters { if parm == "server" { @@ -38,13 +37,12 @@ func (r *OvaClient) GetNfsServerForOva(k8sClient *kubernetes.Clientset) (string, share = val } } - nfsShare = server + ":" + share - - if nfsShare != "" { - r.nfsPath = nfsShare - } else { + nfsShare := server + ":" + share + if nfsShare == "" { return "", errors.New("failed to fatch NFS settings") } + + r.nfsPath = nfsShare return r.nfsPath, nil }