test_server

command
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

test_server is a Unix-domain-socket helper used by the JS cross-language e2e tests Framing: 4-byte big-endian length prefix + raw envelope bytes

CLI flags:

-socket <path>            UDS path to listen on
-self-id <string>         server's own ID
-private-key <hex>        server's 32-byte private key
-client-id <string>       the single paired client's ID
-client-pub <hex>         the client's 65-byte public key
-drop-ack                 if set, the server suppresses renewKeyAckResult to simulate a lost ACK

Registered handlers (so the JS test can exercise them):

echo                  returns the incoming payload unchanged
add                   expects {a, b} and returns {sum}
trigger-push          sends a server Push of type "tick" carrying {n: 42}, then replies {ok: true}
push-under-stashed    builds and writes a push envelope encrypted with the stashed pre-renewal
                      session, bypassing the server's live session cache. The stash is taken
                      automatically inside CommitClientPublicKey just before a key rotation,
                      so this handler exercises the case where an in-flight push from before
                      a renewal arrives after the client has already committed a new key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL