1 import ./make-test-python.nix ({ lib, ... }: {
2 name = "tandoor-recipes";
3 meta.maintainers = with lib.maintainers; [ ambroisie ];
5 nodes.machine = { pkgs, ... }: {
7 services.tandoor-recipes = {
11 DB_ENGINE = "django.db.backends.postgresql";
12 POSTGRES_HOST = "/run/postgresql";
13 POSTGRES_USER = "tandoor_recipes";
14 POSTGRES_DB = "tandoor_recipes";
18 services.postgresql = {
20 ensureDatabases = [ "tandoor_recipes" ];
23 name = "tandoor_recipes";
24 ensurePermissions."DATABASE tandoor_recipes" = "ALL PRIVILEGES";
31 after = [ "postgresql.service" ];
37 machine.wait_for_unit("tandoor-recipes.service")
39 with subtest("Web interface gets ready"):
40 # Wait until server accepts connections
41 machine.wait_until_succeeds("curl -fs localhost:8080")