From ea78ca5dff7102931291591432b587ee3964bf7e Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 21 Apr 2023 17:32:10 +0300 Subject: [PATCH] test(coderd/workspaceapps): Fix incorrect use of testing.T (#7243) --- coderd/workspaceapps/apptest/apptest.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coderd/workspaceapps/apptest/apptest.go b/coderd/workspaceapps/apptest/apptest.go index bb3a1887a6..e20ba046ba 100644 --- a/coderd/workspaceapps/apptest/apptest.go +++ b/coderd/workspaceapps/apptest/apptest.go @@ -47,7 +47,7 @@ func Run(t *testing.T, factory DeploymentFactory) { t.Skip("ConPTY appears to be inconsistent on Windows.") } - expectLine := func(r *bufio.Reader, matcher func(string) bool) { + expectLine := func(t *testing.T, r *bufio.Reader, matcher func(string) bool) { for { line, err := r.ReadString('\n') require.NoError(t, err) @@ -98,8 +98,8 @@ func Run(t *testing.T, factory DeploymentFactory) { _, err = conn.Write(data) require.NoError(t, err) - expectLine(bufRead, matchEchoCommand) - expectLine(bufRead, matchEchoOutput) + expectLine(t, bufRead, matchEchoCommand) + expectLine(t, bufRead, matchEchoOutput) }) t.Run("SignedTokenQueryParameter", func(t *testing.T) { @@ -148,7 +148,7 @@ func Run(t *testing.T, factory DeploymentFactory) { conn := websocket.NetConn(ctx, wsConn, websocket.MessageBinary) bufRead := bufio.NewReader(conn) - expectLine(bufRead, matchEchoOutput) + expectLine(t, bufRead, matchEchoOutput) }) })