nixos/tests/part-db: init
This commit is contained in:
@@ -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 { };
|
||||
|
||||
@@ -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)
|
||||
'';
|
||||
}
|
||||
@@ -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/";
|
||||
|
||||
Reference in New Issue
Block a user