3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/tests/matrix-synapse.nix

32 lines
976 B
Nix
Raw Normal View History

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 = {
# 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";
};
serversqlite = args: {
2017-11-04 18:21:55 +00:00
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 ]");
2017-11-04 18:21:55 +00:00
'';
})