nixos/tests/shelfmark: init
Starts the service and checks that /api/health responds.
This commit is contained in:
@@ -1461,6 +1461,7 @@ in
|
||||
shadps4 = runTest ./shadps4.nix;
|
||||
sharkey = runTest ./web-apps/sharkey.nix;
|
||||
shattered-pixel-dungeon = runTest ./shattered-pixel-dungeon.nix;
|
||||
shelfmark = runTest ./shelfmark.nix;
|
||||
shiori = runTest ./shiori.nix;
|
||||
shoko = import ./shoko.nix { inherit runTest; };
|
||||
signal-desktop = runTest ./signal-desktop.nix;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "shelfmark";
|
||||
meta.maintainers = with lib.maintainers; [ jamiemagee ];
|
||||
|
||||
nodes.machine = {
|
||||
services.shelfmark = {
|
||||
enable = true;
|
||||
environment.FLASK_HOST = "0.0.0.0";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("shelfmark.service")
|
||||
machine.wait_for_open_port(8084)
|
||||
|
||||
with subtest("Health endpoint responds"):
|
||||
machine.succeed("curl --fail http://localhost:8084/api/health")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user