nixosTests.bentopdf: init

This commit is contained in:
Felix Buehler
2026-02-22 00:47:16 +01:00
parent ec60ef02e1
commit d22cd44de7
5 changed files with 64 additions and 0 deletions
+1
View File
@@ -274,6 +274,7 @@ in
beanstalkd = runTest ./beanstalkd.nix;
bees = runTest ./bees.nix;
benchexec = runTest ./benchexec.nix;
bentopdf = handleTest ./bentopdf { };
beszel = runTest ./beszel.nix;
binary-cache = runTest {
imports = [ ./binary-cache.nix ];
+28
View File
@@ -0,0 +1,28 @@
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>BentoPDF - The Privacy First PDF Toolkit</title>" in machine.succeed("curl --fail --show-error --silent --location --insecure http://localhost/")
'';
}
)
+6
View File
@@ -0,0 +1,6 @@
{ system, pkgs, ... }:
{
caddy = import ./caddy.nix { inherit system pkgs; };
nginx = import ./nginx.nix { inherit system pkgs; };
}
+24
View File
@@ -0,0 +1,24 @@
import ../make-test-python.nix (
{ lib, ... }:
{
name = "bentopdf-nginx";
meta.maintainers = with lib.maintainers; [ stunkymonkey ];
nodes.machine =
{ pkgs, ... }:
{
services.bentopdf = {
enable = true;
domain = "localhost";
nginx.enable = true;
};
};
testScript = ''
machine.wait_for_unit("nginx.service")
machine.wait_for_open_port(80)
assert "<title>BentoPDF - The Privacy First PDF Toolkit</title>" in machine.succeed("curl --fail --show-error --silent --location --insecure http://localhost:80/")
'';
}
)
+5
View File
@@ -2,6 +2,7 @@
lib,
buildNpmPackage,
fetchFromGitHub,
nixosTests,
simpleMode ? true,
}:
buildNpmPackage (finalAttrs: {
@@ -36,6 +37,10 @@ buildNpmPackage (finalAttrs: {
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests.bentopdf) caddy nginx;
};
meta = {
description = "Privacy-first PDF toolkit";
homepage = "https://bentopdf.com";