nixpkgs/nixos/tests/morty.nix

31 lines
568 B
Nix
Raw Normal View History

2019-11-06 06:58:22 +00:00
import ./make-test-python.nix ({ pkgs, ... }:
2018-05-30 16:13:16 +00:00
{
name = "morty";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ leenaars ];
};
nodes =
{ mortyProxyWithKey =
{ ... }:
2018-05-30 16:13:16 +00:00
{ services.morty = {
enable = true;
key = "78a9cd0cfee20c672f78427efb2a2a96036027f0";
port = 3001;
};
};
};
testScript =
{ ... }:
2018-05-30 16:13:16 +00:00
''
2019-11-06 06:58:22 +00:00
mortyProxyWithKey.wait_for_unit("default.target")
mortyProxyWithKey.wait_for_open_port(3001)
2020-09-16 15:03:37 +00:00
mortyProxyWithKey.succeed("curl -fL 127.0.0.1:3001 | grep MortyProxy")
2018-05-30 16:13:16 +00:00
'';
})