mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
3050406388
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
32 lines
976 B
Nix
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 ]");
|
|
'';
|
|
|
|
})
|