Extract Jellyfin test extraScript into commonExtraScript and prepend it in LDAP test
`commonTestScript.access.override` replaces the full extraScript, and in particular drops:
```
server.wait_until_succeeds("journalctl --since -1m --unit jellyfin --grep 'Startup complete'")
```
https://github.com/ibizaman/selfhostblocks/actions/runs/27462763816/job/81262609484?pr=731 shows the symptoms:
* https://github.com/ibizaman/selfhostblocks/actions/runs/27462763816/job/81262609484?pr=731#step:5:7163 logs `Login from client` (defined in 8871b9435b/test/common.nix (L166)) at timestamp `2026-06-14T08:34:06.7507323Z` (visible in the raw logs)
* https://github.com/ibizaman/selfhostblocks/actions/runs/27462763816/job/81262609484?pr=731#step:5:7167 is the first request from Firefox at timestamp 2026-06-14T08:34:18.2868336Z, so the attempt to fill in the username starts around there, with a 30-second timeout
* https://github.com/ibizaman/selfhostblocks/actions/runs/27462763816/job/81262609484?pr=731#step:5:7577 logs `Main: Startup complete 0:01:00.1813498` at timestamp 2026-06-14T08:34:51.1325282Z, 45 seconds after test starts
Work around by explicitly prepending the full extraScript to the override.
This commit is contained in:
parent
8871b9435b
commit
4bfe8e199b
1 changed files with 34 additions and 31 deletions
|
|
@ -5,29 +5,7 @@ let
|
||||||
adminUser = "jellyfin2";
|
adminUser = "jellyfin2";
|
||||||
adminPassword = "admin";
|
adminPassword = "admin";
|
||||||
|
|
||||||
commonTestScript = shb.test.mkScripts {
|
commonExtraScript =
|
||||||
hasSSL = { node, ... }: !(isNull node.config.shb.jellyfin.ssl);
|
|
||||||
waitForServices =
|
|
||||||
{ ... }:
|
|
||||||
[
|
|
||||||
"jellyfin.service"
|
|
||||||
"nginx.service"
|
|
||||||
];
|
|
||||||
waitForPorts =
|
|
||||||
{ node, ... }:
|
|
||||||
[
|
|
||||||
port
|
|
||||||
];
|
|
||||||
waitForUrls =
|
|
||||||
{ proto_fqdn, ... }:
|
|
||||||
[
|
|
||||||
"${proto_fqdn}/System/Info/Public"
|
|
||||||
{
|
|
||||||
url = "${proto_fqdn}/Users/AuthenticateByName";
|
|
||||||
status = 401;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraScript =
|
|
||||||
{ node, ... }:
|
{ node, ... }:
|
||||||
''
|
''
|
||||||
server.wait_until_succeeds("journalctl --since -1m --unit jellyfin --grep 'Startup complete'")
|
server.wait_until_succeeds("journalctl --since -1m --unit jellyfin --grep 'Startup complete'")
|
||||||
|
|
@ -56,6 +34,30 @@ let
|
||||||
if response['code'] != 401:
|
if response['code'] != 401:
|
||||||
raise Exception(f"Expected failure, got: {response['code']}")
|
raise Exception(f"Expected failure, got: {response['code']}")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
commonTestScript = shb.test.mkScripts {
|
||||||
|
hasSSL = { node, ... }: !(isNull node.config.shb.jellyfin.ssl);
|
||||||
|
waitForServices =
|
||||||
|
{ ... }:
|
||||||
|
[
|
||||||
|
"jellyfin.service"
|
||||||
|
"nginx.service"
|
||||||
|
];
|
||||||
|
waitForPorts =
|
||||||
|
{ node, ... }:
|
||||||
|
[
|
||||||
|
port
|
||||||
|
];
|
||||||
|
waitForUrls =
|
||||||
|
{ proto_fqdn, ... }:
|
||||||
|
[
|
||||||
|
"${proto_fqdn}/System/Info/Public"
|
||||||
|
{
|
||||||
|
url = "${proto_fqdn}/Users/AuthenticateByName";
|
||||||
|
status = 401;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraScript = commonExtraScript;
|
||||||
};
|
};
|
||||||
|
|
||||||
basic =
|
basic =
|
||||||
|
|
@ -452,12 +454,13 @@ in
|
||||||
|
|
||||||
testScript = commonTestScript.access.override {
|
testScript = commonTestScript.access.override {
|
||||||
extraScript =
|
extraScript =
|
||||||
{
|
args@{
|
||||||
node,
|
node,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
(commonExtraScript args)
|
||||||
# I have no idea why the LDAP Authentication_19.0.0.0 plugin disappears.
|
# I have no idea why the LDAP Authentication_19.0.0.0 plugin disappears.
|
||||||
''
|
+ ''
|
||||||
r = server.execute('cat "${node.config.services.jellyfin.dataDir}/plugins/LDAP Authentication_19.0.0.0/meta.json"')
|
r = server.execute('cat "${node.config.services.jellyfin.dataDir}/plugins/LDAP Authentication_19.0.0.0/meta.json"')
|
||||||
if r[0] != 0:
|
if r[0] != 0:
|
||||||
print("meta.json for plugin LDAP Authentication_19.0.0.0 not found")
|
print("meta.json for plugin LDAP Authentication_19.0.0.0 not found")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue