Skip to content

Add unit tests for facade and adapter layers (22 modules) #983

Description

@kcenon

What

Add unit tests for the facade (5) and adapter (17) layers. Currently 22 modules have zero coverage.

Part of #953

Why

  • Facade layer is the primary public API — defects cascade to all consumers
  • Adapters bridge protocol-specific behavior to the uniform facade interface
  • Coverage is a prerequisite for API freeze in v1.0 (Prepare network_system for v1.0 release #964)

Where

Target modules

Facades (5): http, quic, tcp, udp, websocket facades under sources/facades/

Adapters (17):

  • http: client adapter, server adapter
  • quic: client adapter, server adapter
  • tcp: client adapter, server adapter
  • udp: client adapter, server adapter
  • websocket: client adapter, server adapter
  • (additional variants — enumerate via find sources -path '*adapter*' -name '*.cpp')

How

Technical Approach

  1. Create tests/unit/facades/ and tests/unit/adapters/
  2. Use gmock to stub the underlying transport
  3. Verify the facade preserves contract: Result propagation, lifecycle, error translation
  4. Test each adapter independently from its facade

Acceptance Criteria

  • Each of the 22 modules has a dedicated test file
  • Coverage for facade + adapter layers >= 75%
  • All tests pass on Ubuntu/macOS/Windows CI
  • Sanitizer builds pass (ASAN, TSAN, UBSAN)
  • No contract regressions detected by facade tests

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions