From f33ef4227ac785d457f0f7a05829a5fa9442fe43 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:43:12 -0600 Subject: [PATCH] Normalize line endings in log testdata files too --- pkg/cmd/agent-task/shared/log_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cmd/agent-task/shared/log_test.go b/pkg/cmd/agent-task/shared/log_test.go index 3fb22cfc7..408240dd1 100644 --- a/pkg/cmd/agent-task/shared/log_test.go +++ b/pkg/cmd/agent-task/shared/log_test.go @@ -34,6 +34,9 @@ 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. + raw = []byte(strings.ReplaceAll(string(raw), "\r\n", "\n")) + lines := slices.DeleteFunc(strings.Split(string(raw), "\n"), func(line string) bool { return line == "" })