summary refs log tree commit diff
path: root/nixos/tests/morty.nix
blob: e052ee988060bda0da66a2eb305c4e5e71d15a43 (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
import ./make-test.nix ({ pkgs, ... }:

{
  name = "morty";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ leenaars ];
  };

  nodes =
    { mortyProxyWithKey =

      { config, pkgs, ... }:
      { services.morty = {
        enable = true;
	key = "78a9cd0cfee20c672f78427efb2a2a96036027f0";
	port = 3001;
	};
      };

    };

  testScript =
    { nodes , ... }:
    ''
      startAll;

      $mortyProxyWithKey->waitForUnit("morty");
      $mortyProxyWithKey->succeed("curl -L 127.0.0.1:3001 | grep MortyProxy");

    '';

})