1 import ./make-test-python.nix ({ pkgs, lib, ... }: {
4 meta.maintainers = with lib.maintainers; [ leona ];
7 vikunjaSqlite = { ... }: {
13 frontendScheme = "http";
14 frontendHostname = "localhost";
16 services.nginx.enable = true;
18 vikunjaPostgresql = { pkgs, ... }: {
24 database = "vikunja-api";
25 host = "/run/postgresql";
27 frontendScheme = "http";
28 frontendHostname = "localhost";
30 services.postgresql = {
32 ensureDatabases = [ "vikunja-api" ];
34 { name = "vikunja-api";
35 ensurePermissions = { "DATABASE \"vikunja-api\"" = "ALL PRIVILEGES"; };
39 services.nginx.enable = true;
45 vikunjaSqlite.wait_for_unit("vikunja-api.service")
46 vikunjaSqlite.wait_for_open_port(3456)
47 vikunjaSqlite.succeed("curl --fail http://localhost:3456/api/v1/info")
49 vikunjaSqlite.wait_for_unit("nginx.service")
50 vikunjaSqlite.wait_for_open_port(80)
51 vikunjaSqlite.succeed("curl --fail http://localhost/api/v1/info")
52 vikunjaSqlite.succeed("curl --fail http://localhost")
54 vikunjaPostgresql.wait_for_unit("vikunja-api.service")
55 vikunjaPostgresql.wait_for_open_port(3456)
56 vikunjaPostgresql.succeed("curl --fail http://localhost:3456/api/v1/info")
58 vikunjaPostgresql.wait_for_unit("nginx.service")
59 vikunjaPostgresql.wait_for_open_port(80)
60 vikunjaPostgresql.succeed("curl --fail http://localhost/api/v1/info")
61 vikunjaPostgresql.succeed("curl --fail http://localhost")