at 23.05-pre 997 B view raw
1import ./make-test-python.nix ({ pkgs, ...} : { 2 name = "postfixadmin"; 3 meta = with pkgs.lib.maintainers; { 4 maintainers = [ globin ]; 5 }; 6 7 nodes = { 8 postfixadmin = { config, pkgs, ... }: { 9 services.postfixadmin = { 10 enable = true; 11 hostName = "postfixadmin"; 12 setupPasswordFile = pkgs.writeText "insecure-test-setup-pw-file" "$2y$10$r0p63YCjd9rb9nHrV9UtVuFgGTmPDLKu.0UIJoQTkWCZZze2iuB1m"; 13 }; 14 services.nginx.virtualHosts.postfixadmin = { 15 forceSSL = false; 16 enableACME = false; 17 }; 18 }; 19 }; 20 21 testScript = '' 22 postfixadmin.start 23 postfixadmin.wait_for_unit("postgresql.service") 24 postfixadmin.wait_for_unit("phpfpm-postfixadmin.service") 25 postfixadmin.wait_for_unit("nginx.service") 26 postfixadmin.succeed( 27 "curl -sSfL http://postfixadmin/setup.php -X POST -F 'setup_password=not production'" 28 ) 29 postfixadmin.succeed("curl -sSfL http://postfixadmin/ | grep 'Mail admins login here'") 30 ''; 31})