1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 06:05:13 +00:00
nixpkgs/nixos/tests/matrix-synapse.nix
xeji 3050406388
nixos/tests/matrix-synapse: fix test (#45596)
Since matrix-synapse 0.33.0 underscores in server names are rejected
by server name validation, causing the test to fail:
  valueError: Server name 'server_sqlite' contains invalid characters
Relevant upstream change:
546bc9e28b
2018-08-26 10:38:52 +02:00

32 lines
976 B
Nix

import ./make-test.nix ({ pkgs, ... } : {
name = "matrix-synapse";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ corngood ];
};
nodes = {
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
serverpostgres = args: {
services.matrix-synapse.enable = true;
services.matrix-synapse.database_type = "psycopg2";
};
serversqlite = args: {
services.matrix-synapse.enable = true;
services.matrix-synapse.database_type = "sqlite3";
};
};
testScript = ''
startAll;
$serverpostgres->waitForUnit("matrix-synapse.service");
$serverpostgres->waitUntilSucceeds("curl -Lk https://localhost:8448/");
$serverpostgres->requireActiveUnit("postgresql.service");
$serversqlite->waitForUnit("matrix-synapse.service");
$serversqlite->waitUntilSucceeds("curl -Lk https://localhost:8448/");
$serversqlite->mustSucceed("[ -e /var/lib/matrix-synapse/homeserver.db ]");
'';
})