Skip to content

Commit ea78ca5

Browse files
authored
test(coderd/workspaceapps): Fix incorrect use of testing.T (#7243)
1 parent 3680e15 commit ea78ca5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coderd/workspaceapps/apptest/apptest.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func Run(t *testing.T, factory DeploymentFactory) {
4747
t.Skip("ConPTY appears to be inconsistent on Windows.")
4848
}
4949

50-
expectLine := func(r *bufio.Reader, matcher func(string) bool) {
50+
expectLine := func(t *testing.T, r *bufio.Reader, matcher func(string) bool) {
5151
for {
5252
line, err := r.ReadString('\n')
5353
require.NoError(t, err)
@@ -98,8 +98,8 @@ func Run(t *testing.T, factory DeploymentFactory) {
9898
_, err = conn.Write(data)
9999
require.NoError(t, err)
100100

101-
expectLine(bufRead, matchEchoCommand)
102-
expectLine(bufRead, matchEchoOutput)
101+
expectLine(t, bufRead, matchEchoCommand)
102+
expectLine(t, bufRead, matchEchoOutput)
103103
})
104104

105105
t.Run("SignedTokenQueryParameter", func(t *testing.T) {
@@ -148,7 +148,7 @@ func Run(t *testing.T, factory DeploymentFactory) {
148148
conn := websocket.NetConn(ctx, wsConn, websocket.MessageBinary)
149149
bufRead := bufio.NewReader(conn)
150150

151-
expectLine(bufRead, matchEchoOutput)
151+
expectLine(t, bufRead, matchEchoOutput)
152152
})
153153
})
154154

0 commit comments

Comments
 (0)