nixos/tests/pretix: init
This commit is contained in:
parent
b05a529fd6
commit
a01acbcefe
3 changed files with 53 additions and 0 deletions
|
@ -729,6 +729,7 @@ in {
|
|||
pppd = handleTest ./pppd.nix {};
|
||||
predictable-interface-names = handleTest ./predictable-interface-names.nix {};
|
||||
pretalx = runTest ./web-apps/pretalx.nix;
|
||||
pretix = runTest ./web-apps/pretix.nix;
|
||||
printing-socket = handleTest ./printing.nix { socket = true; };
|
||||
printing-service = handleTest ./printing.nix { socket = false; };
|
||||
privoxy = handleTest ./privoxy.nix {};
|
||||
|
|
47
nixos/tests/web-apps/pretix.nix
Normal file
47
nixos/tests/web-apps/pretix.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
name = "pretix";
|
||||
meta.maintainers = with lib.maintainers; [ hexa ];
|
||||
|
||||
nodes = {
|
||||
pretix = {
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 tickets.local
|
||||
'';
|
||||
|
||||
services.pretix = {
|
||||
enable = true;
|
||||
nginx.domain = "tickets.local";
|
||||
plugins = with pkgs.pretix.plugins; [
|
||||
passbook
|
||||
pages
|
||||
];
|
||||
settings = {
|
||||
pretix = {
|
||||
instance_name = "NixOS Test";
|
||||
url = "http://tickets.local";
|
||||
};
|
||||
mail.from = "hello@tickets.local";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
pretix.wait_for_unit("pretix-web.service")
|
||||
pretix.wait_for_unit("pretix-worker.service")
|
||||
|
||||
pretix.wait_until_succeeds("curl -q --fail http://tickets.local")
|
||||
|
||||
pretix.succeed("pretix-manage --help")
|
||||
|
||||
pretix.log(pretix.succeed("systemd-analyze security pretix-web.service"))
|
||||
'';
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
, nodejs
|
||||
, python3
|
||||
, gettext
|
||||
, nixosTests
|
||||
, plugins ? [ ]
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -238,6 +240,9 @@ python.pkgs.buildPythonApplication rec {
|
|||
inherit (python.pkgs) callPackage;
|
||||
}
|
||||
);
|
||||
tests = {
|
||||
inherit (nixosTests) pretix;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue