mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 05:20:00 +00:00
paisa: add nixos-tests
This commit is contained in:
@@ -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
23
nixos/tests/paisa.nix
Normal 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")
|
||||
'';
|
||||
}
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user