1 import ./make-test-python.nix ({ pkgs, ... }: {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ fgaz ];
7 nodes.machine = { config, pkgs, ... }: {
11 hostname = "localhost";
13 directory = toString (pkgs.runCommand "merecat-webdir" {} ''
14 mkdir -p $out/foo.localhost $out/bar.localhost
15 echo '<h1>Hello foo</h1>' > $out/foo.localhost/index.html
16 echo '<h1>Hello bar</h1>' > $out/bar.localhost/index.html
23 machine.wait_for_unit("merecat")
24 machine.wait_for_open_port(80)
25 machine.succeed("curl --fail foo.localhost | grep 'Hello foo'")
26 machine.succeed("curl --fail bar.localhost | grep 'Hello bar'")