diff --git a/pkg/cmd/agent-task/shared/log_test.go b/pkg/cmd/agent-task/shared/log_test.go index f5913bf4b..586890d9f 100644 --- a/pkg/cmd/agent-task/shared/log_test.go +++ b/pkg/cmd/agent-task/shared/log_test.go @@ -34,7 +34,7 @@ func TestFollow(t *testing.T) { raw, err := os.ReadFile(tt.log) require.NoError(t, err) - // Delete all the `/r` to make the tests OS-agnostic. + // Normalize CRLF to LF to make the tests OS-agnostic. raw = []byte(strings.ReplaceAll(string(raw), "\r\n", "\n")) lines := slices.DeleteFunc(strings.Split(string(raw), "\n"), func(line string) bool { @@ -63,7 +63,7 @@ func TestFollow(t *testing.T) { want, err := os.ReadFile(tt.want) require.NoError(t, err) - // Delete all the `/r` to make the tests OS-agnostic. + // Normalize CRLF to LF to make the tests OS-agnostic. want = []byte(strings.ReplaceAll(string(want), "\r\n", "\n")) assert.Equal(t, string(want), stdout.String())