mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user