···
1
-
import ./make-test-python.nix (
11
-
server.port = 3000; # upstream default, set explicitly in case upstream changes it
13
-
dialect = "postgres"; # `createLocally` only supports postgres
14
-
host = "/run/postgresql";
15
-
port = 5432; # service will fail if port is not set
10
+
server.port = 3000; # upstream default, set explicitly in case upstream changes it
12
+
dialect = "postgres"; # `createLocally` only supports postgres
13
+
host = "/run/postgresql";
14
+
port = 5432; # service will fail if port is not set
21
-
# Automatically create our database
22
-
database.createLocally = true; # only works with Postgresql for now
20
+
# Automatically create our database
21
+
database.createLocally = true; # only works with Postgresql for now
24
-
# Created with `cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1`
25
-
# Prefer passwordSaltFile in production.
26
-
passwordSalt = "NpqCY7eY7fMoIWYmPx5mAgr6YoSlXSuI";
23
+
# Created with `cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1`
24
+
# Prefer passwordSaltFile in production.
25
+
passwordSalt = "NpqCY7eY7fMoIWYmPx5mAgr6YoSlXSuI";
36
-
dialect = "sqlite3";
35
+
dialect = "sqlite3";
42
-
passwordSalt = "NpqCY7eY7fMoIWYmPx5mAgr6YoSlXSuI";
41
+
passwordSalt = "NpqCY7eY7fMoIWYmPx5mAgr6YoSlXSuI";
47
-
# Test that service works under both postgresql and sqlite3
48
-
# by starting all machines, and curling the default address.
49
-
# This is not very comprehensive for a test, but it should
50
-
# catch very basic mistakes in the module.
52
-
with subtest("Test Wakapi with postgresql backend"):
54
-
wakapiPsql.wait_for_unit("wakapi.service")
55
-
wakapiPsql.wait_for_open_port(3000)
56
-
wakapiPsql.succeed("curl --fail http://localhost:3000")
46
+
# Test that service works under both postgresql and sqlite3
47
+
# by starting all machines, and curling the default address.
48
+
# This is not very comprehensive for a test, but it should
49
+
# catch very basic mistakes in the module.
51
+
with subtest("Test Wakapi with postgresql backend"):
53
+
wakapiPsql.wait_for_unit("wakapi.service")
54
+
wakapiPsql.wait_for_open_port(3000)
55
+
wakapiPsql.succeed("curl --fail http://localhost:3000")
58
-
with subtest("Test Wakapi with sqlite3 backend"):
59
-
wakapiSqlite.start()
60
-
wakapiSqlite.wait_for_unit("wakapi.service")
61
-
wakapiSqlite.wait_for_open_port(3001)
62
-
wakapiSqlite.succeed("curl --fail http://localhost:3001")
57
+
with subtest("Test Wakapi with sqlite3 backend"):
58
+
wakapiSqlite.start()
59
+
wakapiSqlite.wait_for_unit("wakapi.service")
60
+
wakapiSqlite.wait_for_open_port(3001)
61
+
wakapiSqlite.succeed("curl --fail http://localhost:3001")
65
-
meta.maintainers = [ lib.maintainers.NotAShelf ];
64
+
meta.maintainers = [ lib.maintainers.NotAShelf ];