diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 957882749b9a..60c3e7f02541 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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; diff --git a/nixos/tests/shoko.nix b/nixos/tests/shoko.nix index 2d464d45d8ab..dfddc19b83c5 100644 --- a/nixos/tests/shoko.nix +++ b/nixos/tests/shoko.nix @@ -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 ]; + } + ); } diff --git a/pkgs/by-name/sh/shoko/package.nix b/pkgs/by-name/sh/shoko/package.nix index d2424c5d1d08..ac4db1f494bb 100644 --- a/pkgs/by-name/sh/shoko/package.nix +++ b/pkgs/by-name/sh/shoko/package.nix @@ -46,7 +46,7 @@ buildDotnetModule (finalAttrs: { ]; }; - tests.shoko = nixosTests.shoko; + tests = { inherit (nixosTests) shoko; }; }; meta = {