1 import ../make-test-python.nix ({pkgs, ...}:
3 cert = pkgs.runCommand "selfSignedCerts" { nativeBuildInputs = [ pkgs.openssl ]; } ''
4 openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=localhost' -days 36500
6 cp key.pem cert.pem $out
13 machine = {pkgs, ...}: {
16 hostname = "localhost";
17 appKeyFile = "${pkgs.writeText "keyfile" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}";
20 sslCertificate = "${cert}/cert.pem";
21 sslCertificateKey = "${cert}/key.pem";
29 machine.wait_for_unit("monica-setup.service")
30 machine.wait_for_open_port(443)
31 machine.succeed("curl -k --fail https://localhost", timeout=10)