1
0
Fork 0

Enhance logging and error handling in E2E tests and CI workflows

- Added detailed log messages in `conftest.py` for SSL certificate and JWT generation steps.
- Improved Docker Compose E2E test output with service-specific logs during startup and cleanup.
- Adjusted pytest run options in CI workflows to use `--tb=short` for concise error traceback.
This commit is contained in:
Joao Gilberto Magalhaes 2026-02-12 18:26:59 -05:00
parent 4160babc94
commit 904a102b0a
3 changed files with 36 additions and 8 deletions

View file

@ -27,6 +27,7 @@ def generate_ssl_certificates():
pytest.skip(f"SSL certificate generation script not found: {script_path}")
# Run from tests_e2e directory (Docker approach - WORKING)
print("\n[Setup] Generating SSL certificates and JWT keys...")
result = subprocess.run(
["bash", str(script_path)],
cwd=BASE_DIR, # NOT BASE_DIR.parent (K8s bug)
@ -35,8 +36,12 @@ def generate_ssl_certificates():
)
if result.returncode != 0:
print(f"[Setup] ERROR: Certificate generation failed!")
print(f"[Setup] stderr: {result.stderr}")
pytest.fail(f"Failed to generate SSL certificates:\n{result.stderr}")
print("[Setup] ✓ SSL certificates and JWT keys generated successfully")
# Return paths for K8s tests to use
yield {
"host1_local": BASE_DIR / "static" / "host1.local.pem",