Files
nixos-matrix-modules/tests/synapse-sqlite/default.nix
T
oysteikt 56a3a5985f tests/synapse-{postgres,sqlite}: init
This commit ports some of the integrations tests from nixpkgs to be used for
the matrix-synapse-next module.
2026-06-22 15:55:29 +09:00

30 lines
710 B
Nix

# 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 ]")
'';
}