From 84790aafd8b3050e502a16f03ee288c1bb9c21b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 6 Aug 2013 18:31:05 -0700 Subject: [PATCH] relax the lo interface test to allow iface index != 1 --- container_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container_test.go b/container_test.go index 2f9da15f6e..1050bfb2ad 100644 --- a/container_test.go +++ b/container_test.go @@ -1306,10 +1306,10 @@ func TestOnlyLoopbackExistsWhenUsingDisableNetworkOption(t *testing.T) { interfaces := regexp.MustCompile(`(?m)^[0-9]+: [a-zA-Z0-9]+`).FindAllString(string(output), -1) if len(interfaces) != 1 { - t.Fatalf("Wrong interface count in test container: expected [1: lo], got [%s]", interfaces) + t.Fatalf("Wrong interface count in test container: expected [*: lo], got %s", interfaces) } - if interfaces[0] != "1: lo" { - t.Fatalf("Wrong interface in test container: expected [1: lo], got [%s]", interfaces) + if !strings.HasSuffix(interfaces[0], ": lo") { + t.Fatalf("Wrong interface in test container: expected [*: lo], got %s", interfaces) } }