Skip to content

Commit

Permalink
Add error if peer api is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby committed Oct 4, 2021
1 parent 1bddf11 commit 7793012
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
Expand Down Expand Up @@ -692,6 +693,9 @@ func getAPIURLs(tailscales map[string]dockertest.Resource) (map[netaddr.IP]strin
n := ft.Node
for _, a := range n.Addresses { // just add all the addresses
if _, ok := fts[a.IP()]; !ok {
if ft.PeerAPIURL == "" {
return nil, errors.New("api url is empty")
}
fts[a.IP()] = ft.PeerAPIURL
}
}
Expand Down

0 comments on commit 7793012

Please sign in to comment.