From f43a83aad7e0a1a4a3b2559c663a064a5fa2d828 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Thu, 18 Aug 2022 17:53:36 +0200 Subject: [PATCH] Find out IPv4 for taildrop --- integration_general_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/integration_general_test.go b/integration_general_test.go index 840b8165..d363ee26 100644 --- a/integration_general_test.go +++ b/integration_general_test.go @@ -562,11 +562,23 @@ func (s *IntegrationTestSuite) TestTailDrop() { if peername == hostname { continue } + + var ip4 netaddr.IP + for _, ip := range ips[peername] { + if ip.Is4() { + ip4 = ip + break + } + } + if ip4.IsZero() { + panic("no ipv4 address found") + } + s.T().Run(fmt.Sprintf("%s-%s", hostname, peername), func(t *testing.T) { command := []string{ "tailscale", "file", "cp", fmt.Sprintf("/tmp/file_from_%s", hostname), - fmt.Sprintf("%s:", ips[peername][0]), + fmt.Sprintf("%s:", ip4), } retry(10, 1*time.Second, func() error { log.Printf(