nixos/tests/agorakit: init test

This commit is contained in:
Julien Malka 2024-10-14 23:25:16 +02:00 committed by Valentin Gagarin
parent cee07e8dc8
commit 891bfded62
2 changed files with 44 additions and 0 deletions

View File

@ -111,6 +111,7 @@ in {
aesmd = runTestOn ["x86_64-linux"] ./aesmd.nix; aesmd = runTestOn ["x86_64-linux"] ./aesmd.nix;
agate = runTest ./web-servers/agate.nix; agate = runTest ./web-servers/agate.nix;
agda = handleTest ./agda.nix {}; agda = handleTest ./agda.nix {};
agorakit = runTest ./web-apps/agorakit.nix;
airsonic = handleTest ./airsonic.nix {}; airsonic = handleTest ./airsonic.nix {};
akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {}; akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {};
akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; }; akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; };

View File

@ -0,0 +1,43 @@
{ 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")
'';
}