nixosTests.mealie: use 'database.createLocally'

Changed files
+24 -9
nixos
tests
+24 -9
nixos/tests/mealie.nix
···
];
};
-
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")
'';
}
)
···
];
};
+
nodes =
+
let
+
sqlite = {
+
services.mealie = {
+
enable = true;
+
port = 9001;
+
};
+
};
+
postgres = {
+
imports = [ sqlite ];
+
services.mealie.database.createLocally = true;
};
+
in
+
{
+
inherit sqlite postgres;
};
testScript = ''
start_all()
+
+
def test_mealie(node):
+
node.wait_for_unit("mealie.service")
+
node.wait_for_open_port(9001)
+
node.succeed("curl --fail http://localhost:9001")
+
+
test_mealie(sqlite)
+
simple.send_monitor_command("quit")
+
simple.wait_for_shutdown()
+
test_mealie(postgres)
'';
}
)