pkg/ip unit test: be agnostic of Linux version
on Linux 4.4 the syscall error message is "invalid argument" not "file exists" Co-authored-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
This commit is contained in:
parent
0eddc554c0
commit
f3b1ffc960
@ -189,9 +189,8 @@ var _ = Describe("Link", func() {
|
|||||||
It("returns useful error", func() {
|
It("returns useful error", func() {
|
||||||
_ = containerNetNS.Do(func(ns.NetNS) error {
|
_ = containerNetNS.Do(func(ns.NetNS) error {
|
||||||
defer GinkgoRecover()
|
defer GinkgoRecover()
|
||||||
|
|
||||||
_, _, err := ip.SetupVeth(containerVethName, mtu, hostNetNS)
|
_, _, err := ip.SetupVeth(containerVethName, mtu, hostNetNS)
|
||||||
Expect(err.Error()).To(Equal("failed to move veth to host netns: file exists"))
|
Expect(err.Error()).To(HavePrefix("failed to move veth to host netns: "))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user