integration tests: send ip netns add errors to stderr, too
This commit is contained in:
parent
9131e7a99c
commit
9e0f83a7cf
@ -32,8 +32,10 @@ import (
|
||||
func TestDHCPv4(t *testing.T) {
|
||||
const ns = "ns0" // name of the network namespace to use for this test
|
||||
|
||||
if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil {
|
||||
t.Fatalf("ip netns add %s: %v", ns, err)
|
||||
add := exec.Command("ip", "netns", "add", ns)
|
||||
add.Stderr = os.Stderr
|
||||
if err := add.Run(); err != nil {
|
||||
t.Fatalf("%v: %v", add.Args, err)
|
||||
}
|
||||
defer exec.Command("ip", "netns", "delete", ns).Run()
|
||||
|
||||
|
@ -32,8 +32,10 @@ var v6AddrRe = regexp.MustCompile(`2001:db8::[^ ]+`)
|
||||
func TestDHCPv6(t *testing.T) {
|
||||
const ns = "ns1" // name of the network namespace to use for this test
|
||||
|
||||
if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil {
|
||||
t.Fatalf("ip netns add %s: %v", ns, err)
|
||||
add := exec.Command("ip", "netns", "add", ns)
|
||||
add.Stderr = os.Stderr
|
||||
if err := add.Run(); err != nil {
|
||||
t.Fatalf("%v: %v", add.Args, err)
|
||||
}
|
||||
defer exec.Command("ip", "netns", "delete", ns).Run()
|
||||
|
||||
|
@ -153,8 +153,10 @@ func TestNetconfig(t *testing.T) {
|
||||
}
|
||||
const ns = "ns3" // name of the network namespace to use for this test
|
||||
|
||||
if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil {
|
||||
t.Fatalf("ip netns add %s: %v", ns, err)
|
||||
add := exec.Command("ip", "netns", "add", ns)
|
||||
add.Stderr = os.Stderr
|
||||
if err := add.Run(); err != nil {
|
||||
t.Fatalf("%v: %v", add.Args, err)
|
||||
}
|
||||
defer exec.Command("ip", "netns", "delete", ns).Run()
|
||||
|
||||
|
@ -29,8 +29,10 @@ import (
|
||||
func TestRouterAdvertisement(t *testing.T) {
|
||||
const ns = "ns2" // name of the network namespace to use for this test
|
||||
|
||||
if err := exec.Command("ip", "netns", "add", ns).Run(); err != nil {
|
||||
t.Fatalf("ip netns add %s: %v", ns, err)
|
||||
add := exec.Command("ip", "netns", "add", ns)
|
||||
add.Stderr = os.Stderr
|
||||
if err := add.Run(); err != nil {
|
||||
t.Fatalf("%v: %v", add.Args, err)
|
||||
}
|
||||
defer exec.Command("ip", "netns", "delete", ns).Run()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user