From 5de6f7cf6167b04892750423228ccd61ac09ddd4 Mon Sep 17 00:00:00 2001 From: Abhishek Kr Srivastav Date: Wed, 22 May 2024 14:52:52 +0530 Subject: [PATCH] fixed flaky test by splitting expected output string addressed review comments --- staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go b/staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go index 61b10ec93fd..36fa8a70403 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/logs/logs_test.go @@ -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",