depot/third_party/nixpkgs/nixos/tests/matrix/synapse-workers.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

55 lines
1.4 KiB
Nix

import ../make-test-python.nix (
{ pkgs, ... }:
{
name = "matrix-synapse-workers";
meta = {
inherit (pkgs.matrix-synapse.meta) maintainers;
};
nodes = {
homeserver =
{
pkgs,
nodes,
...
}:
{
services.postgresql = {
enable = true;
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'';
};
services.matrix-synapse = {
enable = true;
settings = {
database = {
name = "psycopg2";
args.password = "synapse";
};
enable_registration = true;
enable_registration_without_verification = true;
federation_sender_instances = [ "federation_sender" ];
};
configureRedisLocally = true;
workers = {
"federation_sender" = { };
};
};
};
};
testScript = ''
start_all()
homeserver.wait_for_unit("matrix-synapse.service");
homeserver.wait_for_unit("matrix-synapse-worker-federation_sender.service");
'';
}
)