nixpkgs/nixos/tests/morty.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
562 B
Nix
Raw Permalink Normal View History

{ pkgs, ... }:
2018-05-30 18:13:16 +02:00
{
name = "morty";
meta = with pkgs.lib.maintainers; {
maintainers = [ leenaars ];
};
2018-05-30 18:13:16 +02:00
nodes = {
mortyProxyWithKey =
2018-05-30 18:13:16 +02:00
{ ... }:
{
services.morty = {
enable = true;
key = "78a9cd0cfee20c672f78427efb2a2a96036027f0";
port = 3001;
2020-11-22 17:23:53 +10:00
};
};
2018-05-30 18:13:16 +02:00
};
2018-05-30 18:13:16 +02:00
testScript =
{ ... }:
''
mortyProxyWithKey.wait_for_unit("default.target")
mortyProxyWithKey.wait_for_open_port(3001)
mortyProxyWithKey.succeed("curl -fL 127.0.0.1:3001 | grep MortyProxy")
'';
2018-05-30 18:13:16 +02:00
}