fixed flaky test by splitting expected output string

addressed review comments

Kubernetes-commit: 5de6f7cf6167b04892750423228ccd61ac09ddd4
This commit is contained in:
Abhishek Kr Srivastav 2024-05-22 14:52:52 +05:30 committed by Kubernetes Publisher
parent 55821cad07
commit a4551ef19a
1 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,10 @@ func TestLog(t *testing.T) {
o.Prefix = true
return o
},
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"},
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",
},
},
{
name: "pod logs with prefix: init container",