nixos/tests: add matrix-synapse test
This commit is contained in:
parent
fbba0d0ee5
commit
e591f11c25
|
@ -292,6 +292,7 @@ in rec {
|
||||||
tests.login = callTest tests/login.nix {};
|
tests.login = callTest tests/login.nix {};
|
||||||
#tests.logstash = callTest tests/logstash.nix {};
|
#tests.logstash = callTest tests/logstash.nix {};
|
||||||
tests.mathics = callTest tests/mathics.nix {};
|
tests.mathics = callTest tests/mathics.nix {};
|
||||||
|
tests.matrix-synapse = callTest tests/matrix-synapse.nix {};
|
||||||
tests.mesos = callTest tests/mesos.nix {};
|
tests.mesos = callTest tests/mesos.nix {};
|
||||||
tests.misc = callTest tests/misc.nix {};
|
tests.misc = callTest tests/misc.nix {};
|
||||||
tests.mongodb = callTest tests/mongodb.nix {};
|
tests.mongodb = callTest tests/mongodb.nix {};
|
||||||
|
|
30
nixos/tests/matrix-synapse.nix
Normal file
30
nixos/tests/matrix-synapse.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
import ./make-test.nix ({ pkgs, ... } : {
|
||||||
|
|
||||||
|
name = "matrix-synapse";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ corngood ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
server_postgres = args: {
|
||||||
|
services.matrix-synapse.enable = true;
|
||||||
|
services.matrix-synapse.database_type = "psycopg2";
|
||||||
|
};
|
||||||
|
|
||||||
|
server_sqlite = args: {
|
||||||
|
services.matrix-synapse.enable = true;
|
||||||
|
services.matrix-synapse.database_type = "sqlite3";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
startAll;
|
||||||
|
$server_postgres->waitForUnit("matrix-synapse.service");
|
||||||
|
$server_postgres->waitUntilSucceeds("curl -Lk https://localhost:8448/");
|
||||||
|
$server_postgres->requireActiveUnit("postgresql.service");
|
||||||
|
$server_sqlite->waitForUnit("matrix-synapse.service");
|
||||||
|
$server_sqlite->waitUntilSucceeds("curl -Lk https://localhost:8448/");
|
||||||
|
$server_sqlite->mustSucceed("[ -e /var/lib/matrix-synapse/homeserver.db ]");
|
||||||
|
'';
|
||||||
|
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user