shoko: add plugin test

This commit is contained in:
nanoyaki
2026-01-14 18:21:22 +01:00
parent 38472e8c15
commit cc4e0f0649
3 changed files with 46 additions and 16 deletions
+1 -1
View File
@@ -1418,7 +1418,7 @@ in
sharkey = runTest ./web-apps/sharkey.nix;
shattered-pixel-dungeon = runTest ./shattered-pixel-dungeon.nix;
shiori = runTest ./shiori.nix;
shoko = runTest ./shoko.nix;
shoko = import ./shoko.nix { inherit runTest; };
signal-desktop = runTest ./signal-desktop.nix;
silverbullet = runTest ./silverbullet.nix;
simple = runTest ./simple.nix;
+44 -14
View File
@@ -1,19 +1,49 @@
{ lib, ... }:
{ runTest }:
{
name = "Shoko";
default = runTest (
{ lib, ... }:
nodes.machine = {
services.shoko.enable = true;
};
{
name = "Shoko";
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
nodes.machine = {
services.shoko.enable = true;
};
meta.maintainers = with lib.maintainers; [
diniamo
nanoyaki
];
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
meta.maintainers = with lib.maintainers; [
diniamo
nanoyaki
];
}
);
withPlugins = runTest (
{ pkgs, lib, ... }:
{
name = "Shoko with plugins";
nodes.machine = {
services.shoko = {
enable = true;
plugins = [ pkgs.luarenamer ];
};
};
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
meta.maintainers = with lib.maintainers; [ nanoyaki ];
}
);
}
+1 -1
View File
@@ -46,7 +46,7 @@ buildDotnetModule (finalAttrs: {
];
};
tests.shoko = nixosTests.shoko;
tests = { inherit (nixosTests) shoko; };
};
meta = {