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
pull/564/head
haiyanmeng 2019-01-10 15:07:00 -08:00
parent 08bee2cc84
commit 408b5dbf59
1 changed files with 2 additions and 1 deletions

View File

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