From 9998c7499c9d5119136afc8a6769ced171df6be0 Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Thu, 21 May 2026 12:26:54 -0400 Subject: [PATCH] test: fix TestTunneler_Integration line endings on Windows (#25584) fixes https://github.com/coder/internal/issues/1542 Drop line endings before test assertion to make it more cross-platform. --- codersdk/workspacesdk/tunneler/integration_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codersdk/workspacesdk/tunneler/integration_test.go b/codersdk/workspacesdk/tunneler/integration_test.go index 3fe2703995..45d992e8ce 100644 --- a/codersdk/workspacesdk/tunneler/integration_test.go +++ b/codersdk/workspacesdk/tunneler/integration_test.go @@ -3,6 +3,7 @@ package tunneler_test import ( "bytes" "context" + "strings" "testing" "github.com/stretchr/testify/require" @@ -58,7 +59,8 @@ func TestTunneler_Integration(t *testing.T) { defer testAgent.Close() testutil.TryReceive(ctx, t, app.done) - require.Equal(t, app.result, "foo\n") + // TrimSpace removes line endings, which vary by OS and are not important to this test. + require.Equal(t, "foo", strings.TrimSpace(app.result)) err := tun.GracefulShutdown(ctx) require.NoError(t, err)