Seerr big step: Jellyseerr 2.7.3 -> Seerr v3.5.1, a definition step (init, /app/config to UID 1000, Seerr as node); bench + box + undo proven; Seerr fixture with a throwaway Jellyfin (felhom.eu R-1317)
gates / gates (push) Successful in 50s
gates / gates (push) Successful in 50s
This commit is contained in:
1 parent
1a254d4416
commit
9ef06a7a89
5 files changed
+110
-10
No files matched your search
@@ -1706,6 +1706,70 @@ class Homepage:
|
||||
return ok
|
||||
|
||||
|
||||
# =============================================================================================
|
||||
class Seerr:
|
||||
"""Seerr / Jellyseerr has no account of its own until a MEDIA SERVER signs its first user in, so the fixture brings
|
||||
one: a throwaway `jellyfin/jellyfin:10.11.11` container on the network Seerr is on (`felhom-drill-jellyfin`, the
|
||||
fixture's own — removed by the session after the run), its first user made through Jellyfin's own `/Startup/User`
|
||||
wizard. Then Seerr's own routes, the ones its setup page calls (read in the v2.7.3 and v3.5.1 sources 2026-10-28):
|
||||
`POST /api/v1/auth/jellyfin` with the Jellyfin address signs the first (admin) user in, `POST /api/v1/settings/main`
|
||||
stores an application title. Read-back: `GET /api/v1/settings/public` names the title, the user signs in again
|
||||
(the server address is stored by then), and a wrong password is refused."""
|
||||
sub = "seerr"
|
||||
route = "a throwaway Jellyfin, then POST /api/v1/auth/jellyfin, POST /api/v1/settings/main, GET /api/v1/settings/public"
|
||||
JF = "felhom-drill-jellyfin"
|
||||
|
||||
def _signin(self, w, sub, body):
|
||||
rc, code, out = w.app_curl(sub, "/api/v1/auth/jellyfin", "-D", "-", "-H", "Content-Type: application/json",
|
||||
data=json.dumps(body), method="POST")
|
||||
return code, _set_cookies(out)
|
||||
|
||||
def seed(self, w, sub, say):
|
||||
if not w.wait_app(sub, "/api/v1/status", want=("200",), tries=72):
|
||||
return None
|
||||
net = (w.guest("docker inspect seerr -f '{{range $k, $v := .NetworkSettings.Networks}}{{$k}} {{end}}'").split()
|
||||
or [""])[0]
|
||||
u, pw = "drill" + secrets.token_hex(4), "Drill-" + secrets.token_hex(8)
|
||||
jf = self.JF
|
||||
out = w.guest(f"""docker rm -f {jf} >/dev/null 2>&1
|
||||
docker run -d --name {jf} --network {net} jellyfin/jellyfin:10.11.11 >/dev/null || exit 1
|
||||
# /System/Info/Public answers while the server still starts; the wizard answers 503 until it is up (bench 2026-10-28)
|
||||
for i in $(seq 1 100); do [ "$(docker exec {jf} curl -s -o /dev/null -w '%{{http_code}}' http://127.0.0.1:8096/Startup/User)" = 200 ] && break; sleep 3; done
|
||||
docker exec {jf} curl -s -o /dev/null -w 'user=%{{http_code}} ' -X POST -H 'Content-Type: application/json' --data '{json.dumps({"Name": u, "Password": pw})}' http://127.0.0.1:8096/Startup/User
|
||||
docker exec {jf} curl -s -o /dev/null -w 'complete=%{{http_code}}' -X POST http://127.0.0.1:8096/Startup/Complete
|
||||
""", timeout=400)
|
||||
say(f" seerr: throwaway Jellyfin on {net}: {out.strip()[-40:]}")
|
||||
code, ck = self._signin(w, sub, {"username": u, "password": pw, "hostname": jf, "port": 8096, "useSsl": False,
|
||||
"urlBase": "", "email": u + "@example.invalid", "serverType": 2})
|
||||
if code != "200" or not ck:
|
||||
say(f" seerr: first sign-in through Jellyfin http={code} cookie={bool(ck)}")
|
||||
return None
|
||||
title = "Drill-" + secrets.token_hex(5)
|
||||
rc, code, out = w.app_curl(sub, "/api/v1/settings/main", "-H", "Content-Type: application/json",
|
||||
"-H", f"Cookie: {ck}", data=json.dumps({"applicationTitle": title}), method="POST")
|
||||
say(f" seerr: admin {u} signed in through Jellyfin; application title stored http={code}")
|
||||
if code != "200":
|
||||
return None
|
||||
return {"u": u, "pw": pw, "title": title}
|
||||
|
||||
def verify(self, w, sub, t, say):
|
||||
if not w.wait_app(sub, "/api/v1/status", want=("200",), tries=72):
|
||||
return False
|
||||
rc, code, out = w.app_curl(sub, "/api/v1/settings/public")
|
||||
try:
|
||||
title = json.loads(out).get("applicationTitle")
|
||||
except ValueError:
|
||||
title = None
|
||||
bad, _ = self._signin(w, sub, {"username": t["u"], "password": "wrong-" + secrets.token_hex(6)})
|
||||
if bad == "200":
|
||||
say(" seerr: READBACK UNUSABLE — a wrong password signed in")
|
||||
return False
|
||||
good, ck = self._signin(w, sub, {"username": t["u"], "password": t["pw"]})
|
||||
ok = title == t["title"] and good == "200" and bool(ck)
|
||||
say(f" seerr: the title read back {title == t['title']}; sign-in http={good} (wrong password refused: http {bad}) ok={ok}")
|
||||
return ok
|
||||
|
||||
|
||||
# =============================================================================================
|
||||
class Wanderer:
|
||||
"""Wanderer's OWN web API (the SvelteKit server in front of PocketBase), the routes its UI calls — measured in the
|
||||
@@ -3275,6 +3339,7 @@ FIXTURES = {
|
||||
"papra": Papra(),
|
||||
"wanderer": Wanderer(),
|
||||
"homepage": Homepage(),
|
||||
"seerr": Seerr(),
|
||||
"mealie": Mealie(),
|
||||
"n8n": N8n(),
|
||||
"zipline": Zipline(),
|
||||
|
||||
Reference in new issue
Block a user