1 # Miscellaneous small tests that don't warrant their own VM run.
3 import ./make-test-python.nix ({ pkgs, ...} : rec {
5 meta = with pkgs.lib.maintainers; {
9 nodes.machine = { ... }: {
10 virtualisation.cores = 2;
12 services.privacyidea = {
14 secretKey = "$SECRET_KEY";
16 adminPasswordFile = pkgs.writeText "admin-password" "testing";
17 adminEmail = "root@localhost";
19 # Don't try this at home!
20 environmentFile = pkgs.writeText "pi-secrets.env" ''
27 virtualHosts."_".locations."/".extraConfig = ''
28 uwsgi_pass unix:/run/privacyidea/socket;
35 machine.wait_for_unit("multi-user.target")
36 machine.succeed("curl --fail http://localhost | grep privacyIDEA")
37 machine.succeed("grep \"SECRET_KEY = 'testing'\" /var/lib/privacyidea/privacyidea.cfg")
38 machine.succeed("grep \"PI_PEPPER = 'testing'\" /var/lib/privacyidea/privacyidea.cfg")
40 "curl --fail http://localhost/auth -F username=admin -F password=testing | grep token"