mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 16:35:10 +03:00
Add test code for windows.
This commit is contained in:
parent
b090a0ff67
commit
dd56f4a2c6
4 changed files with 36 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
|||
// +build linux,darwin
|
||||
package water
|
||||
|
||||
import (
|
||||
|
@ -6,6 +7,12 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func startBroadcast(t *testing.T, dst net.IP) {
|
||||
if err := exec.Command("ping", "-b", "-c", "2", dst.String()).Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func setupIfce(t *testing.T, ipNet net.IPNet, dev string) {
|
||||
if err := exec.Command("ip", "link", "set", dev, "up").Run(); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue