Contain all data under ./data/<env> with startup enforcement

This commit is contained in:
2026-10-05 14:46:36 +02:00
parent 4268b1ec9e
commit 44d0c08698
12 changed files with 156 additions and 28 deletions
+3 -2
View File
@@ -3,14 +3,15 @@ import os
import shutil
import subprocess
import sys
import tempfile
import time
from pathlib import Path
import pytest
REPO_ROOT = Path(__file__).resolve().parent.parent
TEST_DATA_DIR = Path(tempfile.mkdtemp(prefix="molodetz-test-"))
TEST_DATA_DIR = REPO_ROOT / "data" / f".tmp-pytest-{os.getpid()}"
shutil.rmtree(TEST_DATA_DIR, ignore_errors=True)
TEST_DATA_DIR.mkdir(parents=True, exist_ok=True)
TEST_PORT = int(os.environ.get("MOLODETZ_TEST_PORT", "8099"))
ADMIN_USERNAME = "retoor"
ADMIN_PASSWORD = "test-admin-pass-4f9c2a"