Skip to content

Commit

Permalink
Fix FetchIngressIP error checking
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Feb 7, 2025
1 parent 7e43806 commit 8a893d7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/e2e/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
if err != nil {
return nil, err
}
ingressIP := strings.Trim(res, " ")
ingressIPs := strings.Split(ingressIP, " ")
if len(ingressIPs) == 0 {
return nil, errors.New("no ingress IP found")
res = strings.TrimSpace(res)
if res == "" {
return nil, errors.New("no ingress IPs found")
}
return ingressIPs, nil
return strings.Split(res, " "), nil
}

func (v VagrantNode) FetchNodeExternalIP() (string, error) {
Expand Down

0 comments on commit 8a893d7

Please sign in to comment.