nixos/hound: port test to python
This commit is contained in:
parent
66c9911264
commit
98b28a776a
|
@ -1,5 +1,5 @@
|
||||||
# Test whether `houndd` indexes nixpkgs
|
# Test whether `houndd` indexes nixpkgs
|
||||||
import ./make-test.nix ({ pkgs, ... } : {
|
import ./make-test-python.nix ({ pkgs, ... } : {
|
||||||
name = "hound";
|
name = "hound";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ grahamc ];
|
maintainers = [ grahamc ];
|
||||||
|
@ -46,13 +46,14 @@ import ./make-test.nix ({ pkgs, ... } : {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript = ''
|
||||||
'' startAll;
|
start_all()
|
||||||
|
|
||||||
$machine->waitForUnit("network.target");
|
machine.wait_for_unit("network.target")
|
||||||
$machine->waitForUnit("hound.service");
|
machine.wait_for_unit("hound.service")
|
||||||
$machine->waitForOpenPort(6080);
|
machine.wait_for_open_port(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"');
|
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'"
|
||||||
'';
|
)
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user