Skip to content

Commit 84a7f1e

Browse files
authored
Merge pull request kubernetes#125049 from srivastav-abhishek/flake-fix-logs-test
fixed flaky test TestLog/stateful_set_logs_with_all_pods by splitting expected output string
2 parents 74d5784 + 5de6f7c commit 84a7f1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ func TestLog(t *testing.T) {
117117
o.Prefix = true
118118
return o
119119
},
120-
expectedOutSubstrings: []string{"[pod/test-sts-0/test-container] test log content for pod test-sts-0\n[pod/test-sts-1/test-container] test log content for pod test-sts-1\n"},
120+
expectedOutSubstrings: []string{
121+
"[pod/test-sts-0/test-container] test log content for pod test-sts-0\n",
122+
"[pod/test-sts-1/test-container] test log content for pod test-sts-1\n",
123+
},
121124
},
122125
{
123126
name: "pod logs with prefix: init container",

0 commit comments

Comments
 (0)