fix: pytest -m live works without extra flags

Root cause: test_schemathesis.py mutates decnet.web.auth.SECRET_KEY at
module-level import time, poisoning JWT verification for all other tests
in the same process — even when fuzz tests are deselected.

- Add pytest_ignore_collect hook in tests/api/conftest.py to skip
  collecting test_schemathesis.py unless -m fuzz is selected
- Add --dist loadscope to addopts so xdist groups by module (protects
  module-scoped fixtures in live tests)
- Remove now-unnecessary xdist_group markers from live test classes
This commit is contained in:
2026-04-16 01:55:38 -04:00
parent 89099b903d
commit 296979003d
4 changed files with 14 additions and 9 deletions

View File

@@ -97,7 +97,6 @@ async def token(live_client):
@pytest.mark.live
@pytest.mark.xdist_group("health_live")
class TestHealthLive:
"""Live integration tests — real DB, real Docker check, real task state."""