forked from danio/nixos-matrix-modules
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:
@@ -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 ]")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user