checks/searxng: init

This commit is contained in:
Max Headroom 2023-01-31 00:00:53 +01:00
parent 858384b0a7
commit 7fda7ca695
2 changed files with 22 additions and 0 deletions

View file

@ -10,6 +10,9 @@
patroni = pkgs.callPackage ./patroni.nix {
patroniModule = self.nixosModules.patroni;
};
searxng = pkgs.callPackage ./searxng.nix {
inherit (self'.packages) searxng;
};
tempo = pkgs.callPackage ./tempo.nix {
inherit (self'.packages) tempo;
};

View file

@ -0,0 +1,19 @@
{ nixosTest, searxng, writeText }:
nixosTest {
name = "searxng";
nodes.machine = {
services.searx = {
enable = true;
runInUwsgi = true;
package = searxng;
settings.server.secret_key = "NixOSTestKey";
uwsgiConfig.http = "0.0.0.0:8080";
};
};
testScript = ''
machine.wait_for_unit("uwsgi.service")
machine.wait_for_open_port(8080)
machine.succeed("curl --fail http://127.0.0.1:8080/")
'';
}