Files
nixpkgs/nixos/tests/bentopdf/caddy.nix
Diogo Correia ce922106cc bentopdf: 1.11.2 -> 2.8.6
Fixes #518346
2026-07-10 00:56:51 +01:00

29 lines
862 B
Nix

import ../make-test-python.nix (
{ lib, ... }:
{
name = "bentopdf-caddy";
meta.maintainers = with lib.maintainers; [ stunkymonkey ];
nodes.machine =
{ pkgs, ... }:
{
services.bentopdf = {
enable = true;
domain = "localhost:80";
caddy.enable = true;
caddy.virtualHost.extraConfig = "tls internal";
};
# disable letsencrypt cert fetching
services.caddy.globalConfig = "auto_https disable_certs";
};
testScript = ''
machine.wait_for_unit("caddy.service")
machine.wait_for_open_port(80)
machine.succeed("curl -vvv --fail --show-error --silent --location --insecure http://localhost/")
assert "<title>PDF Tools</title>" in machine.succeed("curl --fail --show-error --silent --location --insecure http://localhost/")
'';
}
)