0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00

paisa: add nixos-tests

This commit is contained in:
Sebastian Kowalak 2025-06-30 17:18:05 +02:00
parent b11bdcdd4b
commit 322ba968e1
No known key found for this signature in database
3 changed files with 29 additions and 0 deletions

View file

@ -1049,6 +1049,7 @@ in
overlayfs = runTest ./overlayfs.nix;
pacemaker = runTest ./pacemaker.nix;
packagekit = runTest ./packagekit.nix;
paisa = runTest ./paisa.nix;
pam-file-contents = runTest ./pam/pam-file-contents.nix;
pam-oath-login = runTest ./pam/pam-oath-login.nix;
pam-u2f = runTest ./pam/pam-u2f.nix;

23
nixos/tests/paisa.nix Normal file
View file

@ -0,0 +1,23 @@
{ ... }:
{
name = "paisa";
nodes.machine =
{ pkgs, ... }:
{
systemd.services.paisa = {
description = "Paisa";
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.paisa}/bin/paisa serve";
};
};
testScript = ''
start_all()
machine.systemctl("start network-online.target")
machine.wait_for_unit("network-online.target")
machine.wait_for_unit("paisa.service")
machine.wait_for_open_port(7500)
machine.succeed("curl --location --fail http://localhost:7500")
'';
}

View file

@ -16,6 +16,7 @@
librsvg,
pango,
pixman,
nixosTests,
}:
let
@ -83,6 +84,10 @@ buildGoModule (finalAttrs: {
];
versionCheckProgramArg = "version";
passthru.tests = {
inherit (nixosTests) paisa;
};
preBuild = ''
cp -r ${finalAttrs.frontend}/web/static ./web
'';