summary refs log blame commit diff
path: root/nixos/tests/isso.nix
blob: 99dc8009ae06476898335b195d63df787980f1d4 (plain) (tree)
1
2
3
4
5
6
7






                                               








                                               


                  


                
                                         






                                                                                    
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "isso";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ asbachb ];
  };

  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")
  '';
})