python312Packages.millheater: 0.11.8 -> 0.12.0
[NixPkgs.git] / nixos / tests / matrix / synapse-workers.nix
blobe90301aeae9e4a9c9d71bdeeccd11e6d54610374
1 import ../make-test-python.nix ({ pkgs, ... }: {
2   name = "matrix-synapse-workers";
3   meta = with pkgs.lib; {
4     maintainers = teams.matrix.members;
5   };
7   nodes = {
8     homeserver =
9       { pkgs
10       , nodes
11       , ...
12       }: {
13         services.postgresql = {
14           enable = true;
15           initialScript = pkgs.writeText "synapse-init.sql" ''
16             CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
17             CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
18             TEMPLATE template0
19             LC_COLLATE = "C"
20             LC_CTYPE = "C";
21           '';
22         };
24         services.matrix-synapse = {
25           enable = true;
26           settings = {
27             database = {
28               name = "psycopg2";
29               args.password = "synapse";
30             };
31             enable_registration = true;
32             enable_registration_without_verification = true;
34             federation_sender_instances = [ "federation_sender" ];
35           };
36           configureRedisLocally = true;
37           workers = {
38             "federation_sender" = { };
39           };
40         };
41       };
42   };
44   testScript = ''
45     start_all()
47     homeserver.wait_for_unit("matrix-synapse.service");
48     homeserver.wait_for_unit("matrix-synapse-worker-federation_sender.service");
49   '';