nixos/tests/agorakit: init test

Changed files
+44
nixos
tests
+1
nixos/tests/all-tests.nix
···
aesmd = runTestOn ["x86_64-linux"] ./aesmd.nix;
agate = runTest ./web-servers/agate.nix;
agda = handleTest ./agda.nix {};
+
agorakit = runTest ./web-apps/agorakit.nix;
airsonic = handleTest ./airsonic.nix {};
akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {};
akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; };
+43
nixos/tests/web-apps/agorakit.nix
···
+
{ pkgs, ... }:
+
{
+
name = "agorakit";
+
+
meta.maintainers = with pkgs.lib.maintainers; [ julienmalka ];
+
+
nodes = {
+
agorakit =
+
{ ... }:
+
{
+
services.agorakit = {
+
enable = true;
+
appKeyFile = toString (
+
pkgs.writeText "agorakit-app-key" "uTqGUN5GUmUrh/zSAYmhyzRk62pnpXICyXv9eeITI8k="
+
);
+
hostName = "localhost";
+
database.createLocally = true;
+
mail = {
+
driver = "smtp";
+
encryption = "tls";
+
host = "localhost";
+
port = 1025;
+
fromName = "Agorakit";
+
from = "agorakit@localhost";
+
user = "agorakit@localhost";
+
passwordFile = toString (pkgs.writeText "agorakit-mail-pass" "a-secure-mail-password");
+
};
+
};
+
};
+
};
+
+
testScript = ''
+
start_all()
+
+
agorakit.wait_for_unit("nginx.service")
+
agorakit.wait_for_unit("agorakit-setup.service")
+
+
# Login page should now contain the configured site name
+
+
agorakit.succeed("curl http://localhost/login | grep Agorakit")
+
+
'';
+
}