aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/sh/sharkey/test.nix
blob: 7b6f5372e346872e69ab35ed8269c989a352e609 (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
{
  extraModules,
  vhack,
  ...
}:
vhack.runTest {
  name = "sharkey";

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

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

      vhack = {
        persist.enable = true;
        nginx.enable = true;
        sharkey = {
          enable = true;
          fqdn = "sharkey.server";
        };
      };
    };

    client = {...}: {};
  };

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

  testScript = {...}:
  # Python
  ''
    client.wait_until_succeeds("curl --verbose https://sharkey.server | grep 'Thank you for using Sharkey!'")
  '';
}