Self-hosted homelab infrastructure visualizer — interactive network diagram with live status monitoring
TypeScript diagramhomelabhomelab-infrastructure-observabilitynetworkproxmox-veself-hostedzigbeezwavezwave-js
fix: generate test config.yml in conftest for CI
Pouzor45189e2748a9
diff --git a/backend/tests/conftest.py b/backend/tests/conftest.pyindex 7781225..ecfa01a 100644--- a/backend/tests/conftest.py+++ b/backend/tests/conftest.py@@ -4,7 +4,9 @@ import osos.environ.setdefault("SECRET_KEY", "test-only-secret-key-not-for-production")import pytest+import yamlfrom httpx import ASGITransport, AsyncClient+from passlib.context import CryptContextfrom sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_enginefrom app.db.database import Base, get_db@@ -12,6 +14,25 @@ from app.main import appTEST_DB_URL = "sqlite+aiosqlite:///:memory:"+_pwd_ctx = CryptContext(schemes=["bcrypt"], deprecated="auto")++[email protected](autouse=True, scope="session")+def test_config_file(tmp_path_factory):+ """Write a minimal config.yml for the test session and point settings at it."""+ cfg = {+ "auth": {+ "username": "admin",+ "password_hash": _pwd_ctx.hash("admin"),+ },+ "scanner": {"ranges": []},+ "status_checker": {"interval_seconds": 3600},+ }+ cfg_path = tmp_path_factory.mktemp("cfg") / "config.yml"+ cfg_path.write_text(yaml.dump(cfg))+ from app.core.config import settings+ settings.config_path = str(cfg_path)+@pytest.fixtureasync def db_session():