Files
nixpkgs/nixos/tests/web-apps/froide-govplan.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

45 lines
1.1 KiB
Nix

{
lib,
pkgs,
...
}:
{
name = "froide-govplan";
meta.maintainers = with lib.maintainers; [ onny ];
nodes = {
machine = {
virtualisation.memorySize = 2048;
services.froide-govplan.enable = true;
};
};
testScript =
let
changePassword = pkgs.writeText "change-password.py" ''
from django.contrib.auth.models import User
u = User.objects.get(username='govplan')
u.set_password('govplan')
u.save()
'';
in
''
start_all()
machine.wait_for_unit("froide-govplan.service")
machine.wait_for_file("/run/froide-govplan/froide-govplan.socket")
with subtest("Home screen loads"):
machine.succeed(
"curl -sSfL http://[::1]:80 | grep '<title>django CMS</title>'"
)
with subtest("Superuser can be created"):
machine.succeed(
"froide-govplan createsuperuser --noinput --username govplan --email govplan@example.com"
)
# Django doesn't have a "clean" way of inputting the password from the command line
machine.succeed("cat '${changePassword}' | froide-govplan shell")
'';
}