2017-11-04 18:21:55 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ... } : {
|
|
|
|
|
|
|
|
name = "matrix-synapse";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ corngood ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
2018-08-26 09:38:52 +01:00
|
|
|
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
|
|
|
|
serverpostgres = args: {
|
2017-11-04 18:21:55 +00:00
|
|
|
services.matrix-synapse.enable = true;
|
|
|
|
services.matrix-synapse.database_type = "psycopg2";
|
|
|
|
};
|
|
|
|
|
2018-08-26 09:38:52 +01:00
|
|
|
serversqlite = args: {
|
2017-11-04 18:21:55 +00:00
|
|
|
services.matrix-synapse.enable = true;
|
|
|
|
services.matrix-synapse.database_type = "sqlite3";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
startAll;
|
2018-08-26 09:38:52 +01:00
|
|
|
$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 ]");
|
2017-11-04 18:21:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
})
|