mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 09:40:40 +00:00
fix: stabilize docker runtime smoke checks
This commit is contained in:
1 parent
6822b8e496
commit
f5403448a7
3 files changed
+26
-1
No files matched your search
@@ -18,7 +18,9 @@ cleanup() {
|
||||
docker logs "$CONTAINER_NAME" >/dev/null 2>&1 || true
|
||||
docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true
|
||||
if [[ -z "${VOXVERA_DOCKER_SMOKE_TMPDIR:-}" ]]; then
|
||||
rm -rf "$TMP_DIR"
|
||||
chmod -R u+w "$TMP_DIR" 2>/dev/null || true
|
||||
docker run --rm -v "$TMP_DIR:/cleanup" python:3.11-slim sh -lc 'rm -rf /cleanup/* /cleanup/.[!.]* /cleanup/..?* 2>/dev/null || true' >/dev/null 2>&1 || true
|
||||
rm -rf "$TMP_DIR" 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
@@ -97,6 +97,14 @@ def test_docker_runtime_assets_are_present():
|
||||
assert "scripts/docker-runtime-smoke.sh" in ci_workflow
|
||||
assert "starts an in-container Tor daemon" in docker_doc
|
||||
|
||||
|
||||
def test_support_matrix_path_has_runtime_fallbacks():
|
||||
base_platform = (REPO_ROOT / "voxvera" / "platforms" / "base.py").read_text(encoding="utf-8")
|
||||
|
||||
assert "VOXVERA_SUPPORT_MATRIX_PATH" in base_platform
|
||||
assert 'Path.cwd() / "support-matrix.json"' in base_platform
|
||||
assert 'Path("/opt/voxvera/support-matrix.json")' in base_platform
|
||||
|
||||
def test_locale_completeness():
|
||||
"""Verify that all non-English locales have the same keys as English."""
|
||||
locales_dir = REPO_ROOT / "voxvera" / "locales"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -33,6 +34,20 @@ class PlatformAdapter:
|
||||
|
||||
@property
|
||||
def support_matrix_path(self) -> Path:
|
||||
candidates = []
|
||||
env_path = os.environ.get("VOXVERA_SUPPORT_MATRIX_PATH")
|
||||
if env_path:
|
||||
candidates.append(Path(env_path))
|
||||
candidates.extend(
|
||||
[
|
||||
self.repo_root / "support-matrix.json",
|
||||
Path.cwd() / "support-matrix.json",
|
||||
Path("/opt/voxvera/support-matrix.json"),
|
||||
]
|
||||
)
|
||||
for candidate in candidates:
|
||||
if candidate.exists():
|
||||
return candidate
|
||||
return self.repo_root / "support-matrix.json"
|
||||
|
||||
def _run_capture(self, args: list[str]) -> tuple[bool, str]:
|
||||
|
||||
Reference in new issue
Block a user