make the gre test pass

This commit is contained in:
Vishvananda Ishaya 2015-12-18 12:14:58 -08:00
parent 2e77ee0835
commit bfd70f5564
2 changed files with 11 additions and 13 deletions

View File

@ -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

View File

@ -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) {