about summary refs log tree commit diff
path: root/nixos/tests/hound.nix
diff options
context:
space:
mode:
authorJan Hrnko <jan.hrnko@satoshilabs.com>2019-11-09 20:09:13 +0100
committerFlorian Klink <flokli@flokli.de>2019-11-22 20:38:56 +0100
commit98b28a776af779c6947d9592f2d7d72e6d35971c (patch)
treec1151e330db2dcf7caa5d5ba9bac7d2df2322a37 /nixos/tests/hound.nix
parent66c9911264069b24151d4aaedcf6f2c1129650af (diff)
nixos/hound: port test to python
Diffstat (limited to 'nixos/tests/hound.nix')
-rw-r--r--nixos/tests/hound.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/nixos/tests/hound.nix b/nixos/tests/hound.nix
index cb8e25332c076..27c65abdf27c3 100644
--- a/nixos/tests/hound.nix
+++ b/nixos/tests/hound.nix
@@ -1,5 +1,5 @@
 # Test whether `houndd` indexes nixpkgs
-import ./make-test.nix ({ pkgs, ... } : {
+import ./make-test-python.nix ({ pkgs, ... } : {
   name = "hound";
   meta = with pkgs.stdenv.lib.maintainers; {
     maintainers = [ grahamc ];
@@ -46,13 +46,14 @@ import ./make-test.nix ({ pkgs, ... } : {
     };
   };
 
-  testScript =
-    '' startAll;
+  testScript = ''
+    start_all()
 
-       $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"');
-
-    '';
+    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'"
+    )
+  '';
 })