nixos/mealie: init tests

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
Litchi Pi 2024-02-01 08:30:57 +01:00
parent ba9431edf8
commit aeb79caaf6
3 changed files with 30 additions and 0 deletions

View file

@ -516,6 +516,7 @@ in {
matrix-synapse = handleTest ./matrix/synapse.nix {}; matrix-synapse = handleTest ./matrix/synapse.nix {};
matrix-synapse-workers = handleTest ./matrix/synapse-workers.nix {}; matrix-synapse-workers = handleTest ./matrix/synapse-workers.nix {};
mattermost = handleTest ./mattermost.nix {}; mattermost = handleTest ./mattermost.nix {};
mealie = handleTest ./mealie.nix {};
mediamtx = handleTest ./mediamtx.nix {}; mediamtx = handleTest ./mediamtx.nix {};
mediatomb = handleTest ./mediatomb.nix {}; mediatomb = handleTest ./mediatomb.nix {};
mediawiki = handleTest ./mediawiki.nix {}; mediawiki = handleTest ./mediawiki.nix {};

24
nixos/tests/mealie.nix Normal file
View file

@ -0,0 +1,24 @@
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "mealie";
meta = with pkgs.lib.maintainers; {
maintainers = [ litchipi ];
};
nodes = {
server = {
services.mealie = {
enable = true;
port = 9001;
};
};
};
testScript = ''
start_all()
server.wait_for_unit("mealie.service")
server.wait_for_open_port(9001)
server.succeed("curl --fail http://localhost:9001")
'';
})

View file

@ -3,6 +3,7 @@
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, makeWrapper , makeWrapper
, nixosTests
, python3Packages , python3Packages
, stdenv , stdenv
, writeShellScript , writeShellScript
@ -144,6 +145,10 @@ in pythonpkgs.buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
passthru.tests = {
inherit (nixosTests) mealie;
};
meta = with lib; { meta = with lib; {
description = "A self hosted recipe manager and meal planner"; description = "A self hosted recipe manager and meal planner";
longDescription = '' longDescription = ''