Skip to content

Backend factory contract tests #87

Open
Open

Description

@aram356

Description

Add contract coverage for the portable backend-factory behavior across supported adapters. Existing adapter contract suites cover request conversion, stores and responses, but no shared backend-factory/options contract exists on main; portable outbound request, Fastly TLS and fixed timeout settings, Cloudflare Fetch request construction and Axum proxy construction expose differing construction policies.

Steps to reproduce

  1. Inspect the Fastly, Cloudflare and Spin contract suites and Axum proxy tests.
  2. Look for common assertions covering runtime origins, TLS/SNI configuration, timeout settings and backend reuse.
  3. Separate existing generic proxy tests from the still-missing backend configuration contract.

Expected behavior

Each adapter proves the same portable backend contract where supported and proves explicit unsupported behavior elsewhere.

Impact

Differences in backend configuration can remain undetected when only ordinary proxy success paths are covered.

Proposed fix

Create shared contract cases for runtime origins, option defaults/overrides, reuse and errors; exercise adapter-specific runtime seams without live credentials or public network dependencies. Reconcile with PR #275 and reuse its relevant contracts.

Done when

  • All supported adapters have backend contract coverage for the chosen shared API.
  • TLS/SNI and each timeout control have either behavior checks or explicit unsupported checks.
  • Reuse and invalid-configuration cases are covered; runtime-only checks identify their required harness.

Related

Parent #79; implementation #80–#86. PR #275 is related open contract work, not evidence this task is complete.

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions