mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
Find out IPv4 for taildrop
This commit is contained in:
parent
7185f8dfea
commit
f43a83aad7
@ -562,11 +562,23 @@ func (s *IntegrationTestSuite) TestTailDrop() {
|
|||||||
if peername == hostname {
|
if peername == hostname {
|
||||||
continue
|
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) {
|
s.T().Run(fmt.Sprintf("%s-%s", hostname, peername), func(t *testing.T) {
|
||||||
command := []string{
|
command := []string{
|
||||||
"tailscale", "file", "cp",
|
"tailscale", "file", "cp",
|
||||||
fmt.Sprintf("/tmp/file_from_%s", hostname),
|
fmt.Sprintf("/tmp/file_from_%s", hostname),
|
||||||
fmt.Sprintf("%s:", ips[peername][0]),
|
fmt.Sprintf("%s:", ip4),
|
||||||
}
|
}
|
||||||
retry(10, 1*time.Second, func() error {
|
retry(10, 1*time.Second, func() error {
|
||||||
log.Printf(
|
log.Printf(
|
||||||
|
Loading…
Reference in New Issue
Block a user