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 == "" })