mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-24 08:47:49 +00:00
Uncomment ping test
This commit is contained in:
parent
700382cba4
commit
a8d9fdce3c
@ -286,30 +286,30 @@ func (s *IntegrationTestSuite) TestStatus() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// func (s *IntegrationTestSuite) TestPingAllPeers() {
|
func (s *IntegrationTestSuite) TestPingAllPeers() {
|
||||||
// ips, err := getIPs()
|
ips, err := getIPs()
|
||||||
// assert.Nil(s.T(), err)
|
assert.Nil(s.T(), err)
|
||||||
//
|
|
||||||
// for hostname, tailscale := range tailscales {
|
for hostname, tailscale := range tailscales {
|
||||||
// for peername, ip := range ips {
|
for peername, ip := range ips {
|
||||||
// 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) {
|
||||||
// // We currently cant ping ourselves, so skip that.
|
// We currently cant ping ourselves, so skip that.
|
||||||
// if peername != hostname {
|
if peername != hostname {
|
||||||
// command := []string{"tailscale", "ping", "--timeout=1s", "--c=1", ip.String()}
|
command := []string{"tailscale", "ping", "--timeout=1s", "--c=1", ip.String()}
|
||||||
//
|
|
||||||
// fmt.Printf("Pinging from %s (%s) to %s (%s)\n", hostname, ips[hostname], peername, ip)
|
fmt.Printf("Pinging from %s (%s) to %s (%s)\n", hostname, ips[hostname], peername, ip)
|
||||||
// result, err := executeCommand(
|
result, err := executeCommand(
|
||||||
// &tailscale,
|
&tailscale,
|
||||||
// command,
|
command,
|
||||||
// )
|
)
|
||||||
// assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
// fmt.Printf("Result for %s: %s\n", hostname, result)
|
fmt.Printf("Result for %s: %s\n", hostname, result)
|
||||||
// assert.Contains(t, result, "pong")
|
assert.Contains(t, result, "pong")
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
func getIPs() (map[string]netaddr.IP, error) {
|
func getIPs() (map[string]netaddr.IP, error) {
|
||||||
ips := make(map[string]netaddr.IP)
|
ips := make(map[string]netaddr.IP)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user