forked from danio/nixos-matrix-modules
56a3a5985f
This commit ports some of the integrations tests from nixpkgs to be used for the matrix-synapse-next module.
30 lines
710 B
Nix
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 ]")
|
|
'';
|
|
}
|