From e9ff80d24a14d786e68141cf18e40edcc8e58fa8 Mon Sep 17 00:00:00 2001 From: Michiel Leenaars Date: Wed, 30 May 2018 18:13:16 +0200 Subject: morty: init as service --- nixos/tests/morty.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 nixos/tests/morty.nix (limited to 'nixos/tests/morty.nix') diff --git a/nixos/tests/morty.nix b/nixos/tests/morty.nix new file mode 100644 index 00000000000..e052ee98806 --- /dev/null +++ b/nixos/tests/morty.nix @@ -0,0 +1,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"); + + ''; + +}) -- cgit 1.4.1