From 408b5dbf5912cdd951c8196386042a4bc4d32e71 Mon Sep 17 00:00:00 2001 From: haiyanmeng Date: Thu, 10 Jan 2019 15:07:00 -0800 Subject: [PATCH] Fix the broken for loop including goroutine Currently, all the funcs in the for loop are bound to the same testCase. Also remove extra newline from one expected message --- test/e2e/common/runtime.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/common/runtime.go b/test/e2e/common/runtime.go index 7fdb321589..ae8bd0b48c 100644 --- a/test/e2e/common/runtime.go +++ b/test/e2e/common/runtime.go @@ -172,7 +172,7 @@ while true; do sleep 1; done TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError, }, phase: v1.PodFailed, - message: Equal("DONE\n"), + message: Equal("DONE"), }, { @@ -201,6 +201,7 @@ while true; do sleep 1; done message: Equal("OK"), }, } { + testCase := testCase It(fmt.Sprintf("should report termination message %s", testCase.name), func() { testCase.container.Name = "termination-message-container" c := ConformanceContainer{