APP_BASE_URL default (config, .env.example, both compose files) is now https://conchecker.scoutitsystems.com with no port, so review-required and final-report email links use the public site. CI bakes the short commit SHA into the image as APP_BUILD via a Docker build-arg; /health returns version+build and the site header shows the build so it's easy to confirm which image is deployed. Local runs default to 'dev'.
22 lines
574 B
Python
22 lines
574 B
Python
from fastapi.testclient import TestClient
|
|
|
|
from backend import config
|
|
from backend.main import app
|
|
|
|
|
|
def test_health_includes_version_and_build():
|
|
client = TestClient(app)
|
|
response = client.get("/health")
|
|
assert response.status_code == 200
|
|
body = response.json()
|
|
assert body["version"] == config.APP_VERSION
|
|
assert body["build"] == config.APP_BUILD
|
|
|
|
|
|
def test_app_base_url_default_is_public_site():
|
|
assert config.APP_BASE_URL == "https://conchecker.scoutitsystems.com"
|
|
|
|
|
|
def test_app_build_defaults_to_dev():
|
|
assert config.APP_BUILD == "dev"
|