Free-Way icon indicating copy to clipboard operation
Free-Way copied to clipboard

[test] Add Quick Start smoke test with a local mock provider

Open GoDiao opened this issue 6 months ago • 0 comments

Goal

Add an automated smoke test that proves the README Quick Start path works without requiring real provider keys.

Background

Today pm run build and pm run test:usage pass, but they do not verify that a fresh user can start Free-Way and call the main local endpoints. A local mock provider would make the basic path testable in CI and on contributor machines.

Suggested scope

  • Add a local mock OpenAI-compatible provider server inside a test script.
  • Start Free-Way against that mock provider.
  • Verify the main local endpoints with simple requests.
  • Keep the test self-contained and avoid real provider credentials.

Suggested endpoints to cover

  • GET /health
  • GET /v1/models
  • POST /v1/chat/completions
  • POST /v1/messages
  • at least one basic error path, such as missing model or malformed JSON

Acceptance criteria

  • A new command such as pm run test:smoke runs locally without real API keys.
  • The test starts and stops any mock/local servers cleanly.
  • The README or contributor docs mention the new verification command if appropriate.

pm run build still passes.

GoDiao avatar May 06 '26 16:05 GoDiao