Skip to content

test: add integration tests with mock control server #5

Description

@forkwright

Problem

Zero integration tests exist. The full protocol flow (TCP connect → TLS → HTTP upgrade → Noise handshake → register → map stream) is never tested end-to-end. wire.rs only tests URL parsing.

Required

  1. Mock TLS server using rcgen (test cert generation) + rustls ServerConfig
  2. Mock implements: GET /key?v=71, POST /ts2021 upgrade, register RPC, map streaming
  3. Tests:
    • connects_and_completes_noise_handshake
    • register_returns_authorized_on_valid_preauth_key
    • register_returns_needs_auth_when_no_key
    • map_stream_applies_initial_full_response
    • map_stream_handles_delta_updates
    • map_stream_keepalive_does_not_modify_netmap
    • disconnected_server_returns_wire_error
    • malformed_http_response_returns_error

Location

crates/dictyon/tests/wire_integration.rs

Dependencies

Add rcgen to [dev-dependencies].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions