Unverified Commit f8658cdd authored by Lyna's avatar Lyna
Browse files

nixosTests.porxie: init

parent 61236303
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1303,6 +1303,7 @@ in
  polaris = runTest ./polaris.nix;
  pomerium = handleTestOn [ "x86_64-linux" ] ./pomerium.nix { };
  portunus = runTest ./portunus.nix;
  porxie = runTest ./porxie.nix;
  postfix = handleTest ./postfix.nix { };
  postfix-raise-smtpd-tls-security-level =
    handleTest ./postfix-raise-smtpd-tls-security-level.nix

nixos/tests/porxie.nix

0 → 100644
+23 −0
Original line number Diff line number Diff line
{ lib, ... }:
{
  name = "porxie";

  nodes.machine =
    { pkgs, ... }:
    {
      services.porxie = {
        enable = true;
        settings = {
          PORXIE_SERVER_ADDRESS = "ip:127.0.0.1:6453";
        };
      };
    };

  testScript = ''
    machine.wait_for_unit("porxie.service")
    machine.wait_for_open_port(6453)
    machine.succeed("curl --fail http://localhost:6453")
  '';

  meta.maintainers = [ lib.maintainers.blooym ];
}
+8 −1
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
  lib,
  fetchFromCodeberg,
  rustPlatform,
  nixosTests,
  stdenvNoCC,
  nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -18,7 +20,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
  };
  cargoHash = "sha256-a0Ps8SvheQoX+Ai8EYgEpyTFwNvB7E3J6MfGiyEvMzM=";

  passthru.updateScript = nix-update-script { };
  passthru = {
    updateScript = nix-update-script { };
    tests = lib.optionalAttrs stdenvNoCC.hostPlatform.isLinux {
      porxie = nixosTests.porxie;
    };
  };

  meta = {
    description = "Porxie, an ATProto blob proxy for secure content delivery";