Skip to content

Commit 2a06cac

Browse files
committed
nixos/tests/privatebin: init
1 parent 22e2e02 commit 2a06cac

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

nixos/tests/all-tests.nix

+1
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ in {
818818
printing-socket = handleTest ./printing.nix { socket = true; };
819819
printing-service = handleTest ./printing.nix { socket = false; };
820820
private-gpt = handleTest ./private-gpt.nix {};
821+
privatebin = runTest ./privatebin.nix;
821822
privoxy = handleTest ./privoxy.nix {};
822823
prometheus = handleTest ./prometheus {};
823824
prometheus-exporters = handleTest ./prometheus-exporters.nix {};

nixos/tests/privatebin.nix

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{ lib, ... }:
2+
3+
{
4+
name = "privatebin";
5+
meta.maintainers = [ lib.maintainers.savyajha ];
6+
7+
nodes.dataImporter =
8+
{ ... }:
9+
{
10+
services.privatebin = {
11+
enable = true;
12+
enableNginx = true;
13+
};
14+
};
15+
16+
testScript = ''
17+
dataImporter.wait_for_unit("phpfpm-privatebin.service")
18+
dataImporter.wait_for_unit("nginx.service")
19+
dataImporter.succeed("curl -fvvv -Ls http://localhost/ | grep 'PrivateBin'")
20+
'';
21+
}

pkgs/by-name/pr/privatebin/package.nix

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
2222
runHook postInstall
2323
'';
2424

25+
passthru.tests = nixosTests.privatebin;
26+
2527
meta = {
2628
changelog = "https://github.com/PrivateBin/PrivateBin/releases/tag/${finalAttrs.version}";
2729
description = "Minimalist, open source online pastebin where the server has zero knowledge of pasted data.";

0 commit comments

Comments
 (0)