Commit 2a06cac3 authored by Savyasachee Jha's avatar Savyasachee Jha
Browse files

nixos/tests/privatebin: init

parent 22e2e021
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {};
+21 −0
Original line number Diff line number Diff line
{ 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'")
  '';
}
+2 −0
Original line number Diff line number Diff line
@@ -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.";