isso: added a test to verify that the server is able to start and a generated javascript file is available
This commit is contained in:
parent
21f0b45155
commit
c1a7bbc38f
28
nixos/tests/isso.nix
Normal file
28
nixos/tests/isso.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
name = "isso";
|
||||||
|
meta = with pkgs.lib.maintainers; {
|
||||||
|
maintainers = [ asbachb ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.isso ];
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = let
|
||||||
|
issoConfig = pkgs.writeText "minimal-isso.conf" ''
|
||||||
|
[general]
|
||||||
|
dbpath = /tmp/isso-comments.db
|
||||||
|
host = http://localhost
|
||||||
|
'';
|
||||||
|
|
||||||
|
port = 8080;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
machine.succeed("isso -c ${issoConfig} &")
|
||||||
|
|
||||||
|
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")
|
||||||
|
'';
|
||||||
|
})
|
Loading…
Reference in a new issue