1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/tests/isso.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
792 B
Nix
Raw Normal View History

import ./make-test-python.nix (
{ pkgs, ... }:
{
name = "isso";
meta = with pkgs.lib.maintainers; {
maintainers = [ ];
};
2022-03-20 23:15:30 +00:00
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")
'';
}
)