Sync backend/frontend versions to Docker/VERSION and read version from it
This commit is contained in:
15
backend/tests/test_version.py
Normal file
15
backend/tests/test_version.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import app
|
||||
|
||||
|
||||
def test_app_version_matches_docker_version() -> None:
|
||||
"""The backend version should match the signed off Docker release version."""
|
||||
|
||||
repo_root = Path(__file__).resolve().parents[2]
|
||||
version_file = repo_root / "Docker" / "VERSION"
|
||||
expected = version_file.read_text(encoding="utf-8").strip().lstrip("v")
|
||||
|
||||
assert app.__version__ == expected
|
||||
Reference in New Issue
Block a user