Support runtime report inside container layout
This commit is contained in:
@@ -28,6 +28,7 @@ def test_runtime_report_is_read_only_by_default_and_requires_confirmation() -> N
|
|||||||
dockerfile = (ROOT / "deploy" / "unraid" / "Dockerfile.all-in-one").read_text(encoding="utf-8")
|
dockerfile = (ROOT / "deploy" / "unraid" / "Dockerfile.all-in-one").read_text(encoding="utf-8")
|
||||||
|
|
||||||
assert '"mode": "read_only"' in source
|
assert '"mode": "read_only"' in source
|
||||||
|
assert 'IMPORT_ROOT = ROOT if (ROOT / "app").is_dir() else BACKEND' in source
|
||||||
assert "if args.reconcile and args.confirm != RECONCILE_CONFIRMATION" in source
|
assert "if args.reconcile and args.confirm != RECONCILE_CONFIRMATION" in source
|
||||||
assert "RuntimeReconciliationService.reconcile(db)" in source
|
assert "RuntimeReconciliationService.reconcile(db)" in source
|
||||||
assert "COPY scripts/runtime_state_report.py /app/scripts/runtime_state_report.py" in dockerfile
|
assert "COPY scripts/runtime_state_report.py /app/scripts/runtime_state_report.py" in dockerfile
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ from pathlib import Path
|
|||||||
|
|
||||||
ROOT = Path(__file__).resolve().parents[1]
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
BACKEND = ROOT / "backend"
|
BACKEND = ROOT / "backend"
|
||||||
sys.path.insert(0, str(BACKEND))
|
IMPORT_ROOT = ROOT if (ROOT / "app").is_dir() else BACKEND
|
||||||
|
sys.path.insert(0, str(IMPORT_ROOT))
|
||||||
|
|
||||||
from app.db.session import SessionLocal # noqa: E402
|
from app.db.session import SessionLocal # noqa: E402
|
||||||
from app.models import AnalysisRun, Job # noqa: E402
|
from app.models import AnalysisRun, Job # noqa: E402
|
||||||
|
|||||||
Reference in New Issue
Block a user