aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/ro/rocie/test.nix
blob: 1f0fccb0e187fc67800b749edaf19ad8413f18a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  extraModules,
  vhack,
  ...
}:
vhack.runTest {
  name = "rocie";

  serverDomains = [
    {server = "rocie.server";}
  ];

  nodes = {
    server = {config, ...}: {
      imports =
        extraModules
        ++ [
          ../../../../modules
        ];

      age.identityPaths = ["${../../../common/email/hostKey}"];

      vhack = {
        persist.enable = true;
        nginx.enable = true;
        rocie = {
          enable = true;
          domain = "rocie.server";
          loginSecret = ./secrets/login.age;
        };
      };
    };

    client = {_, ...}: {};
  };

  services = [
    {server = "rocie.service";}
  ];

  testScript = {...}:
  # Python
  ''
    client.wait_until_succeeds("curl --verbose https://rocie.server/api/can-be-provisioned > out.file")
    client.copy_from_vm("out.file")
  '';
}