From eb87fc92156c86f9d5c090784d7f2b0852fb0c28 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Sun, 26 Sep 2021 15:17:27 +0200 Subject: [PATCH] Fixed getAPIURLs method --- integration_test.go | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/integration_test.go b/integration_test.go index 71d0fc9d..1f4a9b33 100644 --- a/integration_test.go +++ b/integration_test.go @@ -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{},