service-update-alerts/tests/test_live_services.py
Jeena 7537de2f53 feat: Add authenticated service checks
Support FreshRSS login with challenge hashing, add GitHub token usage, and update service metadata for Immich and PeerTube.
2026-03-12 13:57:37 +00:00

26 lines
939 B
Python

import os
import sys
from pathlib import Path
import pytest
sys.path.append(str(Path(__file__).resolve().parents[1]))
from check_updates import check_service, load_dotenv, load_services, load_yaml
@pytest.mark.skipif(os.getenv("RUN_LIVE_TESTS") != "1", reason="Live tests disabled")
def test_live_service_versions():
load_dotenv()
services = load_services(load_yaml("services.yaml"))
failures = []
for service in services.values():
result = check_service(service, timeout=20, user_agent="check-for-updates-test")
if service.upstream_latest_version_url and not result["latest"]:
failures.append(f"{service.name}: latest version missing ({result['latest_error']})")
if service.current_version_url and not result["current"]:
failures.append(f"{service.name}: current version missing ({result['current_error']})")
if failures:
pytest.fail("\n".join(failures))