fixed flaky test by splitting expected output string

addressed review comments
This commit is contained in:
Abhishek Kr Srivastav 2024-05-22 14:52:52 +05:30
parent 5732a8bbb4
commit 5de6f7cf61

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",