We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TerminalReader
1 parent 2d26e8f commit a474ffdCopy full SHA for a474ffd
scaletest/reconnectingpty/run_test.go
@@ -22,7 +22,6 @@ import (
22
23
func Test_Runner(t *testing.T) {
24
t.Parallel()
25
- t.Skip("https://github.com/coder/internal/issues/98")
26
27
t.Run("OK", func(t *testing.T) {
28
@@ -43,14 +42,16 @@ func Test_Runner(t *testing.T) {
43
42
44
logs := bytes.NewBuffer(nil)
45
err := runner.Run(ctx, "1", logs)
46
- logStr := logs.String()
47
- t.Log("Runner logs:\n\n" + logStr)
48
require.NoError(t, err)
49
50
- require.Contains(t, logStr, "Output:")
+ tr := testutil.NewTerminalReader(t, logs)
+ err = tr.ReadUntilString(ctx, "Output:")
+ require.NoError(t, err)
+
51
// OSX: Output:\n\thello world\n
52
// Win: Output:\n\t\x1b[2J\x1b[m\x1b[H\x1b]0;Administrator: C:\\Program Files\\PowerShell\\7\\pwsh.exe\a\x1b[?25hhello world\n
53
- require.Contains(t, logStr, "hello world\n")
+ err = tr.ReadUntilString(ctx, "hello world")
54
55
})
56
57
t.Run("NoLogOutput", func(t *testing.T) {
0 commit comments