From f3b1ffc96000f45a60406ea6753f600517519bd6 Mon Sep 17 00:00:00 2001 From: Mikael Manukyan Date: Tue, 9 Jul 2019 16:58:57 -0700 Subject: [PATCH] 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 --- pkg/ip/link_linux_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/ip/link_linux_test.go b/pkg/ip/link_linux_test.go index 58905455..7249c9ef 100644 --- a/pkg/ip/link_linux_test.go +++ b/pkg/ip/link_linux_test.go @@ -189,9 +189,8 @@ var _ = Describe("Link", func() { It("returns useful error", func() { _ = containerNetNS.Do(func(ns.NetNS) error { defer GinkgoRecover() - _, _, 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 })