feat(test): add test-schema target and SCHEMA_QUICK=1 mode for schemathesis

- Add dedicated test-schema Makefile target (xdist logical, 600s timeout,
  -m fuzz) so schemathesis runs separately from test-fuzz, which was
  spinning up competing uvicorn workers per xdist process
- Exclude all test_schemathesis*.py files from FUZZ_FLAGS via --ignore
- Add schema to _ALL_SUITES between api and fuzz
- Add SCHEMA_QUICK env var (default 0): caps every max_examples to 100
  across all four schemathesis files (4520 -> 600 total examples)
- Fix pre-push hook: use .311 venv and delegate to make test-all FAIL_FAST=0
  instead of hand-rolling five separate pytest invocations
This commit is contained in:
2026-05-16 18:25:40 -04:00
parent ac332a6ba9
commit 0fe9f895d0
5 changed files with 36 additions and 10 deletions

View File

@@ -17,6 +17,8 @@ os.environ.setdefault("DECNET_JWT_SECRET", "schemathesis-swarm-secret-32chars-mi
import pytest
import schemathesis as st
_QUICK = os.getenv("SCHEMA_QUICK") == "1"
from schemathesis.checks import not_a_server_error
from schemathesis.specs.openapi.checks import (
status_code_conformance,
@@ -54,7 +56,7 @@ CHECKS = (
@pytest.mark.fuzz
@SCHEMA.parametrize()
@settings(
max_examples=200,
max_examples=100 if _QUICK else 200,
deadline=None,
suppress_health_check=[
HealthCheck.filter_too_much,