Skip to content

test(func-tests): drop mock layer, keep live smoke + add config simulate#1363

Closed
sileht wants to merge 2 commits into
devs/sileht/func-tests/add-functional-live-smoke-harness-ci-api-cmds--1ee94f6cfrom
devs/sileht/func-tests/drop-mock-layer-keep-live-smoke-add-config--a8144945
Closed

test(func-tests): drop mock layer, keep live smoke + add config simulate#1363
sileht wants to merge 2 commits into
devs/sileht/func-tests/add-functional-live-smoke-harness-ci-api-cmds--1ee94f6cfrom
devs/sileht/func-tests/drop-mock-layer-keep-live-smoke-add-config--a8144945

Conversation

@sileht
Copy link
Copy Markdown
Member

@sileht sileht commented May 5, 2026

The mock layer added in the previous commit duplicated coverage
already provided by the in-tree Rust wiremock unit tests; keeping
it added a pytest-httpserver dependency and a parallel PR-gate job
for no incremental signal.

Removed:

  • test_scopes_send.py / test_junit_process.py (mock-based)
  • fixtures/junit_fail.xml (only used by deleted tests)
  • pytest-httpserver dev dep
  • func-test poe task and the func-tests PR-gate job

Added:

  • test_config_simulate — third live smoke test covering
    POST /v1/repos/{owner}/{repo}/pulls/{n}/simulator

func-tests/ is now live-only: three smoke tests gated on
LIVE_TEST_MERGIFY_TOKEN, run from the dedicated nightly workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Depends-On: #1362

sileht and others added 2 commits May 5, 2026 15:37
…ands

Two new test layers parallel to compat-tests:

- Mock-based functional tests under func-tests/ that drive the real
  mergify binary against pytest-httpserver and assert request /
  response shape for `ci scopes-send` (4 cases) and `ci junit-process`
  (5 cases). Wired into ci-gate via a new `func-tests` job in
  ci.yaml.

- Live smoke tests (test_live_smoke.py, marked `pytest.mark.live`)
  that hit the real Mergify API at
  mergify-clients-testing/mergify-cli-repo PR #1. Skipped unless
  LIVE_TEST_MERGIFY_TOKEN is set; driven by a dedicated
  func-tests-live workflow on a nightly cron + manual dispatch, NOT
  wired into ci-gate. Catches the class of mock drift schema-level
  checks miss — real auth, real serialization, response shape.

The mock layer keeps the PR feedback loop fast and offline-safe; the
live layer is a canary for "the mock has lied about the wire
contract." The live workflow runs in a dedicated `func-tests-live`
GitHub Environment so the staging-tenant secret can be rotated and
audited independently.

Adds pytest-httpserver==1.1.3 to dev deps and a `live` pytest marker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I1ee94f6c9e1d6ac7d4ad22fe07b98860ecec12e9
The mock layer added in the previous commit duplicated coverage
already provided by the in-tree Rust wiremock unit tests; keeping
it added a pytest-httpserver dependency and a parallel PR-gate job
for no incremental signal.

Removed:
- test_scopes_send.py / test_junit_process.py (mock-based)
- fixtures/junit_fail.xml (only used by deleted tests)
- pytest-httpserver dev dep
- `func-test` poe task and the `func-tests` PR-gate job

Added:
- test_config_simulate — third live smoke test covering
  POST /v1/repos/{owner}/{repo}/pulls/{n}/simulator

func-tests/ is now live-only: three smoke tests gated on
LIVE_TEST_MERGIFY_TOKEN, run from the dedicated nightly workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: Ia8144945e0c4f1227b075c8614aa5dfa5dc1c3c1
@sileht
Copy link
Copy Markdown
Member Author

sileht commented May 5, 2026

This pull request is part of a Mergify stack:

# Pull Request Link
1 test(func-tests): add functional + live smoke harness for ci API commands #1362
2 test(func-tests): drop mock layer, keep live smoke + add config simulate #1363 👈

@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 5, 2026 13:45 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 5, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 ⛓️ Depends-On Requirements

Waiting for:

This rule is failing.

Requirement based on the presence of Depends-On in the body of the pull request

🔴 👀 Review Requirements

Waiting for:

  • #approved-reviews-by>=2
This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟠 🤖 Continuous Integration

Waiting for:

  • check-success=ci-gate
Waiting checks: ci-gate.
  • all of:
    • check-success=ci-gate

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@sileht sileht force-pushed the devs/sileht/func-tests/add-functional-live-smoke-harness-ci-api-cmds--1ee94f6c branch from bf4ce3f to 949f0c2 Compare May 5, 2026 13:55
@sileht sileht closed this May 5, 2026
@sileht sileht deleted the devs/sileht/func-tests/drop-mock-layer-keep-live-smoke-add-config--a8144945 branch May 5, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant