1 import ../make-test-python.nix (
4 testdir = pkgs.writeTextDir "www/app.psgi" ''
8 [ "Content-Type" => "text/plain" ],
9 [ "Hello, Perl on Unit!" ],
16 name = "unit-perl-test";
17 meta.maintainers = with pkgs.lib.maintainers; [ sgo ];
29 config = pkgs.lib.strings.toJSON {
30 listeners."*:8080".application = "perl";
33 script = "${testdir}/www/app.psgi";
39 machine.wait_for_unit("unit.service")
40 machine.wait_for_open_port(8080)
42 response = machine.succeed("curl -f -vvv -s http://127.0.0.1:8080/")
43 assert "Hello, Perl on Unit!" in response, "Hello world"