git.iko.soy/typeable/nixpkgs
on master help sign in
isso: added a test to verify that the server is able to start and a generated javascript file is available
commitc1a7bbc38f62033eeb51a644e300969bf4efd3cf authorBenjamin Asbach <asbachb@users.noreply.github.com> dateFri 6 Aug 2021, 23:02 (5 years ago) parent21f0b45
1 file changed+28
nixos/tests/isso.nix+28
nixos/tests/isso.nixnew file+28
@@ -0,0 +1,28 @@
1+import ./make-test-python.nix ({ pkgs, ... }: {
2+ name = "isso";
3+ meta = with pkgs.lib.maintainers; {
4+ maintainers = [ asbachb ];
5+ };
6+
7+ machine = { config, pkgs, ... }: {
8+ environment.systemPackages = [ pkgs.isso ];
9+ };
10+
11+ testScript = let
12+ issoConfig = pkgs.writeText "minimal-isso.conf" ''
13+ [general]
14+ dbpath = /tmp/isso-comments.db
15+ host = http://localhost
16+ '';
17+
18+ port = 8080;
19+ in
20+ ''
21+ machine.succeed("isso -c ${issoConfig} &")
22+
23+ machine.wait_for_open_port("${toString port}")
24+
25+ machine.succeed("curl --fail http://localhost:${toString port}/?uri")
26+ machine.succeed("curl --fail http://localhost:${toString port}/js/embed.min.js")
27+ '';
28+})