nixos/tests/pretix: migrate to nspawn
This commit is contained in:
@@ -1,50 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
name = "pretix";
|
||||
meta.maintainers = with lib.maintainers; [ hexa ];
|
||||
meta.maintainers = pkgs.pretix.meta.maintainers;
|
||||
|
||||
nodes = {
|
||||
pretix = {
|
||||
virtualisation.memorySize = 2048;
|
||||
containers.pretix = {
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 tickets.local
|
||||
'';
|
||||
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 tickets.local
|
||||
'';
|
||||
|
||||
services.pretix = {
|
||||
enable = true;
|
||||
nginx.domain = "tickets.local";
|
||||
plugins = with pkgs.pretix.plugins; [
|
||||
passbook
|
||||
pages
|
||||
zugferd
|
||||
];
|
||||
settings = {
|
||||
pretix = {
|
||||
instance_name = "NixOS Test";
|
||||
url = "http://tickets.local";
|
||||
};
|
||||
mail.from = "hello@tickets.local";
|
||||
services.pretix = {
|
||||
enable = true;
|
||||
nginx.domain = "tickets.local";
|
||||
plugins = with pkgs.pretix.plugins; [
|
||||
passbook
|
||||
pages
|
||||
zugferd
|
||||
];
|
||||
settings = {
|
||||
pretix = {
|
||||
instance_name = "NixOS Test";
|
||||
url = "http://tickets.local";
|
||||
};
|
||||
mail.from = "hello@tickets.local";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
testScript =
|
||||
# python
|
||||
''
|
||||
start_all()
|
||||
|
||||
pretix.wait_for_unit("pretix-web.service")
|
||||
pretix.wait_for_unit("pretix-worker.service")
|
||||
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.wait_until_succeeds("curl -q --fail http://tickets.local")
|
||||
|
||||
pretix.succeed("pretix-manage --help")
|
||||
pretix.succeed("pretix-manage --help | grep -q 'createsuperuser'")
|
||||
|
||||
pretix.log(pretix.succeed("systemd-analyze security pretix-web.service"))
|
||||
'';
|
||||
pretix.log(pretix.succeed("systemd-analyze security pretix-web.service"))
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user