nixos/tests/part-db: init

This commit is contained in:
oddlama
2026-01-18 11:12:52 +01:00
parent 8a242fb675
commit 1c8c7ad527
3 changed files with 26 additions and 0 deletions
+1
View File
@@ -1208,6 +1208,7 @@ in
paperless = runTest ./paperless.nix;
paretosecurity = runTest ./paretosecurity.nix;
parsedmarc = handleTest ./parsedmarc { };
part-db = runTest ./web-apps/part-db.nix;
pass-secret-service = runTest ./pass-secret-service.nix;
password-option-override-ordering = runTest ./password-option-override-ordering.nix;
patroni = handleTestOn [ "x86_64-linux" ] ./patroni.nix { };
+22
View File
@@ -0,0 +1,22 @@
{ lib, ... }:
{
name = "part-db";
meta.maintainers = with lib.maintainers; [ oddlama ];
nodes = {
machine = {
services.part-db.enable = true;
};
};
testScript = ''
start_all()
machine.wait_for_unit("postgresql.service")
machine.wait_for_unit("part-db-migrate.service")
machine.wait_for_unit("phpfpm-part-db.service")
machine.wait_for_unit("nginx.service")
machine.wait_for_open_port(80)
machine.succeed("curl -L --fail http://localhost | grep 'Part-DB'", timeout=10)
'';
}
+3
View File
@@ -7,6 +7,7 @@
nodejs,
yarnConfigHook,
yarnBuildHook,
nixosTests,
envLocalPath ? "/var/lib/part-db/env.local",
cachePath ? "/var/cache/part-db/",
logPath ? "/var/log/part-db/",
@@ -84,6 +85,8 @@ stdenv.mkDerivation (finalAttrs: {
ln -s ${cachePath} $out/var/cache
'';
passthru.tests = { inherit (nixosTests) part-db; };
meta = {
description = "Open source inventory management system for your electronic components";
homepage = "https://docs.part-db.de/";