depot/third_party/nixpkgs/nixos/tests/isso.nix
Default email 13da32182d Project import generated by Copybara.
GitOrigin-RevId: a7855f2235a1876f97473a76151fec2afa02b287
2022-08-21 15:32:41 +02:00

30 lines
690 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "isso";
meta = with pkgs.lib.maintainers; {
maintainers = [ asbachb ];
};
nodes.machine = { config, pkgs, ... }: {
services.isso = {
enable = true;
settings = {
general = {
dbpath = "/var/lib/isso/comments.db";
host = "http://localhost";
};
};
};
};
testScript = let
port = 8080;
in
''
machine.wait_for_unit("isso.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/?uri")
machine.succeed("curl --fail http://localhost:${toString port}/js/embed.min.js")
'';
})