mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
test(coderd/workspaceapps): Fix incorrect use of testing.T (#7243)
This commit is contained in:
committed by
GitHub
parent
3680e158d9
commit
ea78ca5dff
@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user