nixos/hound: port test to python

Changed files
+10 -9
nixos
tests
+10 -9
nixos/tests/hound.nix
···
# Test whether `houndd` indexes nixpkgs
-
import ./make-test.nix ({ pkgs, ... } : {
name = "hound";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ grahamc ];
···
};
};
-
testScript =
-
'' startAll;
-
$machine->waitForUnit("network.target");
-
$machine->waitForUnit("hound.service");
-
$machine->waitForOpenPort(6080);
-
$machine->waitUntilSucceeds('curl http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep "Filename" | grep "hello"');
-
-
'';
})
···
# Test whether `houndd` indexes nixpkgs
+
import ./make-test-python.nix ({ pkgs, ... } : {
name = "hound";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ grahamc ];
···
};
};
+
testScript = ''
+
start_all()
+
machine.wait_for_unit("network.target")
+
machine.wait_for_unit("hound.service")
+
machine.wait_for_open_port(6080)
+
machine.wait_until_succeeds(
+
"curl http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep 'Filename' | grep 'hello'"
+
)
+
'';
})