test(v2): define protocol and clean-break contracts
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
ROOT = Path(__file__).parents[2]
|
||||
|
||||
|
||||
def test_v1_executable_packages_are_absent() -> None:
|
||||
assert not (ROOT / "backend" / "app").exists()
|
||||
assert not (ROOT / "backend" / "backup").exists()
|
||||
assert not (ROOT / "backend" / "tests").exists()
|
||||
assert not (ROOT / "frontend" / "src" / "api" / "client.ts").exists()
|
||||
|
||||
|
||||
def test_v1_reference_tag_exists() -> None:
|
||||
result = subprocess.run(
|
||||
["git", "tag", "--list", "v1-reference-2026-07-27"],
|
||||
cwd=ROOT,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0
|
||||
assert result.stdout.strip() == "v1-reference-2026-07-27"
|
||||
|
||||
|
||||
def test_forbidden_v1_scanner_accepts_runtime_tree() -> None:
|
||||
result = subprocess.run(
|
||||
[sys.executable, "tools/forbidden_v1_scan.py", "."],
|
||||
cwd=ROOT,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0, result.stdout + result.stderr
|
||||
Reference in New Issue
Block a user