mirror of https://github.com/vishvananda/netlink
make the gre test pass
This commit is contained in:
parent
2e77ee0835
commit
bfd70f5564
|
@ -1,5 +1,8 @@
|
|||
language: go
|
||||
before_script:
|
||||
# make sure we keep path in tact when we sudo
|
||||
- sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
|
||||
# modprobe ip_gre or else the first gre device can't be deleted
|
||||
- sudo modprobe ip_gre
|
||||
install:
|
||||
- go get github.com/vishvananda/netns
|
||||
|
|
|
@ -114,20 +114,15 @@ func testLinkAddDel(t *testing.T, link Link) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// It appears that some links don't disappear immediately. Specifically,
|
||||
// the first GreTap device takes a moment to delete.
|
||||
for i := 0; i < 10; i++ {
|
||||
links, err = LinkList()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(links) == num {
|
||||
if len(links) != num {
|
||||
t.Fatal("Link not removed properly")
|
||||
return
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
t.Fatal("Link not removed properly")
|
||||
}
|
||||
|
||||
func compareVxlan(t *testing.T, expected, actual *Vxlan) {
|
||||
|
|
Loading…
Reference in New Issue