diff --git a/ops/audit/tests/test_service_health.py b/ops/audit/tests/test_service_health.py index 91b2912..dd36b9d 100644 --- a/ops/audit/tests/test_service_health.py +++ b/ops/audit/tests/test_service_health.py @@ -4,6 +4,7 @@ import socket import unittest import urllib.error import urllib.request +from pathlib import Path CHECKS = { "audit": "http://127.0.0.1:9160/health", @@ -12,6 +13,8 @@ CHECKS = { "matrix": "http://192.168.1.155:8008/_matrix/client/versions", "prism": "http://127.0.0.1:8095/api/health", "seerr": "http://192.168.1.121:5055/api/v1/status", + "hub-core": "http://127.0.0.1:9120/status", + "n8n": "http://192.168.1.108:5680/healthz", } @@ -28,6 +31,14 @@ class ServiceHealth(unittest.TestCase): failures = {name: url for name, url in CHECKS.items() if not http_ok(url)} self.assertEqual(failures, {}) + def test_jellyfin_auth(self): + key = Path("/root/.jellyfin-key").read_text().strip() + req = urllib.request.Request( + "http://192.168.1.103:8096/System/Info", + headers={"Authorization": 'MediaBrowser Token="%s"' % key}) + with urllib.request.urlopen(req, timeout=6) as r: + self.assertEqual(r.status, 200) + def test_postgres_tcp(self): s = socket.socket() s.settimeout(3)