Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Dec 5, 2023
1 parent d6ffb99 commit f22a649
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/suit/framework/ova.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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
}

Expand Down

0 comments on commit f22a649

Please sign in to comment.