1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

nixos/tests/privatebin: init

This commit is contained in:
Savyasachee Jha 2024-09-29 22:57:42 +05:30
parent 22e2e02118
commit 2a06cac30a
3 changed files with 24 additions and 0 deletions

View file

@ -818,6 +818,7 @@ in {
printing-socket = handleTest ./printing.nix { socket = true; };
printing-service = handleTest ./printing.nix { socket = false; };
private-gpt = handleTest ./private-gpt.nix {};
privatebin = runTest ./privatebin.nix;
privoxy = handleTest ./privoxy.nix {};
prometheus = handleTest ./prometheus {};
prometheus-exporters = handleTest ./prometheus-exporters.nix {};

View file

@ -0,0 +1,21 @@
{ lib, ... }:
{
name = "privatebin";
meta.maintainers = [ lib.maintainers.savyajha ];
nodes.dataImporter =
{ ... }:
{
services.privatebin = {
enable = true;
enableNginx = true;
};
};
testScript = ''
dataImporter.wait_for_unit("phpfpm-privatebin.service")
dataImporter.wait_for_unit("nginx.service")
dataImporter.succeed("curl -fvvv -Ls http://localhost/ | grep 'PrivateBin'")
'';
}

View file

@ -22,6 +22,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru.tests = nixosTests.privatebin;
meta = {
changelog = "https://github.com/PrivateBin/PrivateBin/releases/tag/${finalAttrs.version}";
description = "Minimalist, open source online pastebin where the server has zero knowledge of pasted data.";