nixosTests.bentopdf: init
This commit is contained in:
@@ -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 ];
|
||||
|
||||
@@ -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/")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
{ system, pkgs, ... }:
|
||||
|
||||
{
|
||||
caddy = import ./caddy.nix { inherit system pkgs; };
|
||||
nginx = import ./nginx.nix { inherit system pkgs; };
|
||||
}
|
||||
@@ -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/")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user