1 # Test whether `houndd` indexes nixpkgs
2 import ./make-test-python.nix ({ pkgs, ... } : {
4 meta = with pkgs.lib.maintainers; {
5 maintainers = [ grahamc ];
7 nodes.machine = { pkgs, ... }: {
12 "max-concurrent-indexers": 1,
13 "dbpath": "/var/lib/hound/data",
16 "url": "file:///var/lib/hound/my-git"
23 systemd.services.houndseed = {
24 description = "seed hound with a git repo";
25 requiredBy = [ "hound.service" ];
26 before = [ "hound.service" ];
31 WorkingDirectory = "/var/lib/hound";
35 git config --global user.email "you@example.com"
36 git config --global user.name "Your Name"
37 git init my-git --bare
40 echo 'hi nix!' > hello
42 git commit -m "hello there :)"
43 git remote add origin /var/lib/hound/my-git
44 git push origin master
52 machine.wait_for_unit("network.target")
53 machine.wait_for_unit("hound.service")
54 machine.wait_for_open_port(6080)
55 machine.wait_until_succeeds(
56 "curl -f http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep 'Filename' | grep 'hello'"