Skip to content

[TEST] Add E2E coverage for architecture presets & domain starter#56

Merged
bnbong merged 1 commit intomainfrom
dev
May 2, 2026
Merged

[TEST] Add E2E coverage for architecture presets & domain starter#56
bnbong merged 1 commit intomainfrom
dev

Conversation

@bnbong
Copy link
Copy Markdown
Owner

@bnbong bnbong commented May 2, 2026

Requesting Merging

Description

Part of #41
Closes #46

This PR adds end-to-end and regression coverage for the new architecture preset flow and the fastapi-domain-starter template.

The goal is to make v1.3.0 safer to ship by verifying not only file generation, but also the real shipped template contract, generated project identity markers, interactive preset summary output, and a live health-check request against a generated fastapi-domain-starter app.

Type of Change

  • BUG FIX
  • ADDING NEW TEMPLATE
  • FEATURE ADDED/UPDATED
  • HOTFIX
  • DELETING UNNECESSARY FEATURES
  • DOCUMENTATION & DEVOPS
  • Etc..

Test Environment

  • Local macOS (Apple Silicon / M1), zsh
  • Python via uv
  • Verified command:
    • uv run pytest tests/test_templates/test_domain_starter_e2e.py tests/test_cli_operations/test_cli_interactive_integration.py -q
    • Result: 18 passed

Major Changes

  • Added a new end-to-end test module:

    • tests/test_templates/test_domain_starter_e2e.py
  • Added real-template contract coverage for fastapi-domain-starter

    • Verifies the shipped template passes pyproject-first inspector checks
    • Verifies fastapi-domain-starter remains a pyproject-only template
    • Verifies the template ships the required FastAPI-fastkit identity markers
  • Added generated-project identity coverage

    • Verifies fastkit startdemo fastapi-domain-starter produces a pyproject.toml
      with:
      • the canonical FastAPI-fastkit description marker
      • [tool.fastapi-fastkit].managed = true
    • Verifies is_fastkit_project() recognizes the generated project correctly
  • Added generated-app runtime smoke coverage

    • Generates a real fastapi-domain-starter project
    • Uses the generated project's own .venv
    • Imports the generated app and verifies:
      • GET /api/v1/health returns 200
      • the response body includes ok
  • Added template discoverability coverage

    • Verifies fastkit list-templates shows:
      • the fastapi-domain-starter template id
      • the descriptive title from README.md-tpl
    • Guards against regressions where <project_name> leaks into template listings
  • Strengthened interactive preset integration coverage

    • Updated tests/test_cli_operations/test_cli_interactive_integration.py
    • Adds a regression assertion that the confirmation summary continues to surface the architecture preset row during interactive generation

Screenshots (optional)

N/A

Etc

  • This PR is intentionally test-focused and does not change product behavior directly.
  • The live generated-app health check is skipped on Windows by design because the venv executable path handling differs there.
  • The new tests are intended to guard the most important v1.3.0 regression risks:
    • pyproject-first template drift
    • generated project identity marker drift
    • broken fastapi-domain-starter runtime imports
    • interactive preset summary regressions

@bnbong bnbong added this to the v1.3.0 milestone May 2, 2026
@bnbong bnbong self-assigned this May 2, 2026
@github-actions github-actions Bot added the template Add or editing a FastAPI template label May 2, 2026
@bnbong
Copy link
Copy Markdown
Owner Author

bnbong commented May 2, 2026

@codex review

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end/regression tests to harden the v1.3.0 “architecture presets” interactive flow and the shipped fastapi-domain-starter template contract, including runtime validation of a generated starter project.

Changes:

  • Added a dedicated E2E test module that validates the shipped fastapi-domain-starter template contract, generated-project identity markers, and a live /api/v1/health check using the generated project’s own venv.
  • Strengthened the interactive fastkit init --interactive integration test to assert the architecture preset row appears in the confirmation summary output (guarding a key user-facing regression point).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_templates/test_domain_starter_e2e.py New E2E coverage for domain starter template contract + generated project identity + runtime health smoke check + template discoverability.
tests/test_cli_operations/test_cli_interactive_integration.py Adds assertions ensuring the confirmation summary includes the architecture preset row for all preset flows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bnbong bnbong merged commit c3b484f into main May 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

template Add or editing a FastAPI template template-inspection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEST] Add end-to-end coverage for architecture presets and domain starter

2 participants