Skip to content

Commit

Permalink
Fixed getAPIURLs method
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont committed Sep 26, 2021
1 parent ada4096 commit eb87fc9
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,27 +647,13 @@ func getIPs(tailscales map[string]dockertest.Resource) (map[string]netaddr.IP, e
func getAPIURLs(tailscales map[string]dockertest.Resource) (map[netaddr.IP]string, error) {
fts := make(map[netaddr.IP]string)
for _, tailscale := range tailscales {
command := []string{"tailscale", "ip"}
result, err := executeCommand(
&tailscale,
command,
[]string{},
)
if err != nil {
return nil, err
}
ip, err := netaddr.ParseIP(strings.TrimSuffix(result, "\n"))
if err != nil {
return nil, err
}

command = []string{
command := []string{
"curl",
"--unix-socket",
"/run/tailscale/tailscaled.sock",
"http://localhost/localapi/v0/file-targets",
}
result, err = executeCommand(
result, err := executeCommand(
&tailscale,
command,
[]string{},
Expand Down

0 comments on commit eb87fc9

Please sign in to comment.