mirror of
https://github.com/fumiama/water.git
synced 2026-06-16 08:20:32 +08:00
rename test files (fix https://github.com/songgao/water/issues/4)
This commit is contained in:
16
ipv4_linux_test.go
Normal file
16
ipv4_linux_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package water
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os/exec"
|
||||
"testing"
|
||||
)
|
||||
|
||||
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)
|
||||
}
|
||||
if err := exec.Command("ip", "addr", "add", ipNet.String(), "dev", dev).Run(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user