[ARCH] Tier0/1 health: hub-core, n8n, Jellyfin auth
This commit is contained in:
1 parent
01f996f1d6
commit
9ad26527d7
1 file changed
+11
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user