From 1ecb3e4c2afac8223f3fe1012d9bfed88671083a Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 21 Nov 2022 13:56:18 +0100 Subject: [PATCH] Strip newline from hostname Signed-off-by: Kristoffer Dalby --- integration/ssh_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/ssh_test.go b/integration/ssh_test.go index 6520e994..d480f8df 100644 --- a/integration/ssh_test.go +++ b/integration/ssh_test.go @@ -2,6 +2,7 @@ package integration import ( "fmt" + "strings" "testing" "time" @@ -465,7 +466,7 @@ func assertSSHHostname(t *testing.T, client TailscaleClient, peer TailscaleClien result, _, err := doSSH(t, client, peer) assert.NoError(t, err) - assert.Contains(t, peer.ID(), result) + assert.Contains(t, peer.ID(), strings.ReplaceAll(result, "\n", "")) } func assertSSHPermissionDenied(t *testing.T, client TailscaleClient, peer TailscaleClient) {