mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test: rename ExpectMatchContext to ExpectMatch (#25998)
Cleans the last few instances of ExpectMatch that didn't use the new `(ctx, ...)` variant, then deletes the deprecated method and renames `ExpectMatchContext` to drop the `Context` suffix.
This commit is contained in:
+1
-1
@@ -673,7 +673,7 @@ func TestAgent_SessionTTYShell(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
_ = ptty.Peek(ctx, 1) // wait for the prompt
|
||||
ptty.WriteLine("echo test")
|
||||
ptty.ExpectMatch("test")
|
||||
ptty.ExpectMatch(ctx, "test")
|
||||
ptty.WriteLine("exit")
|
||||
err = session.Wait()
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -203,7 +203,7 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Allow the session to settle (i.e. reach echo).
|
||||
pty.ExpectMatchContext(ctx, "started")
|
||||
pty.ExpectMatch(ctx, "started")
|
||||
// Sleep a bit to ensure the sleep has started.
|
||||
time.Sleep(testutil.IntervalMedium)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user