diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-26 04:01:01 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-04-26 17:06:00 +0300 |
| commit | e9547a8e0de21d0ce81867b06511b68def16aff2 (patch) | |
| tree | 8a025301146434b79ff295ff0d0afc833c682502 /tests/server_headless.rs | |
| parent | 3aa7903d28f94e67c14dd5cad48bbe942fbef2e9 (diff) | |
feat: refine live config lifecycle
Diffstat (limited to 'tests/server_headless.rs')
| -rw-r--r-- | tests/server_headless.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/server_headless.rs b/tests/server_headless.rs index 98ca0b08..19b78e95 100644 --- a/tests/server_headless.rs +++ b/tests/server_headless.rs @@ -576,11 +576,11 @@ fn client_handshake_succeeds() { // Connect to the client socket and perform a handshake. let mut stream = UnixStream::connect(&client_socket).expect("should connect to client socket"); - // Send Hello with version 1, 80 cols, 24 rows. + // Send Hello with version 2, 80 cols, 24 rows. let (version, error) = - client_handshake(&mut stream, 1, 80, 24).expect("handshake should succeed"); + client_handshake(&mut stream, 2, 80, 24).expect("handshake should succeed"); - assert_eq!(version, 1, "server should report protocol version 1"); + assert_eq!(version, 2, "server should report protocol version 2"); assert!( error.is_none(), "handshake should not have an error: {:?}", @@ -609,7 +609,7 @@ fn client_handshake_rejects_incompatible_version() { let (version, error) = client_handshake(&mut stream, 0, 80, 24) .expect("should read Welcome response even on rejection"); - assert_eq!(version, 1, "server should report its version 1"); + assert_eq!(version, 2, "server should report its version 2"); assert!( error.is_some(), "version 0 should be rejected with an error" @@ -634,10 +634,10 @@ fn client_handshake_clamps_small_terminal_size() { // Send Hello with 0x0 terminal size — should be clamped. let mut stream = UnixStream::connect(&client_socket).expect("should connect to client socket"); - let (version, error) = client_handshake(&mut stream, 1, 0, 0) + let (version, error) = client_handshake(&mut stream, 2, 0, 0) .expect("handshake with 0x0 should succeed (server clamps)"); - assert_eq!(version, 1); + assert_eq!(version, 2); assert!( error.is_none(), "0x0 size should be accepted (clamped): {:?}", @@ -697,9 +697,9 @@ fn no_hello_client_closed_within_five_seconds() { // Verify the server is still healthy — a proper client can still connect. let mut good_stream = UnixStream::connect(&client_socket).expect("should connect after no-hello client"); - let (version, error) = client_handshake(&mut good_stream, 1, 80, 24) + let (version, error) = client_handshake(&mut good_stream, 2, 80, 24) .expect("proper handshake should still work after no-hello client"); - assert_eq!(version, 1); + assert_eq!(version, 2); assert!(error.is_none()); // API should still work. |
