tests/synapse-{postgres,sqlite}: init

This commit ports some of the integrations tests from nixpkgs to be used for
the matrix-synapse-next module.
This commit is contained in:
2026-06-22 15:17:26 +09:00
parent f928d60e7d
commit 6d19ccd2c6
4 changed files with 251 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
# Modified from https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/tests/matrix/synapse.nix
{ pkgs, ... }:
{
name = "matrix-synapse-sqlite";
nodes = {
server = args: {
imports = [
../../synapse-module
];
services.matrix-synapse-next = {
enable = true;
settings = {
database.name = "sqlite3";
server_name = "example.com";
};
};
};
};
testScript = ''
server.wait_for_unit("matrix-synapse.service")
server.wait_until_succeeds(
"curl --fail -L --unix-socket /run/matrix-synapse/matrix-synapse.sock http://localhost/"
)
server.succeed("[ -e /var/lib/matrix-synapse/homeserver.db ]")
'';
}