Commit 891bfded authored by Julien Malka's avatar Julien Malka Committed by Valentin Gagarin
Browse files

nixos/tests/agorakit: init test

parent cee07e8d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ in {
  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 −0
Original line number Diff line number Diff line
{ 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")

  '';
}