fix wrong assertion on tests

Signed-off-by: xin.li <xin.li@daocloud.io>

Kubernetes-commit: bc4ae15d77beab23f321bf6547f82c04ba27c3fa
This commit is contained in:
xin.li
2025-02-22 12:39:01 +08:00
committed by Kubernetes Publisher
parent 8fa90a0728
commit d8b34c3ab2
6 changed files with 96 additions and 32 deletions

View File

@@ -49,7 +49,9 @@ func TestFallbackClient_WebSocketPrimarySucceeds(t *testing.T) {
defer conns.conn.Close()
// Loopback the STDIN stream onto the STDOUT stream.
_, err = io.Copy(conns.stdoutStream, conns.stdinStream)
require.NoError(t, err)
if err != nil {
t.Errorf("unexpected error %v", err)
}
}))
defer websocketServer.Close()
@@ -180,7 +182,9 @@ func TestFallbackClient_PrimaryAndSecondaryFail(t *testing.T) {
defer conns.conn.Close()
// Loopback the STDIN stream onto the STDOUT stream.
_, err = io.Copy(conns.stdoutStream, conns.stdinStream)
require.NoError(t, err)
if err != nil {
t.Errorf("unexpected error %v", err)
}
}))
defer websocketServer.Close()