tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/tests: add matrix-synapse test
David McFarland
8 years ago
e591f11c
fbba0d0e
+31
2 changed files
expand all
collapse all
unified
split
nixos
release.nix
tests
matrix-synapse.nix
+1
nixos/release.nix
···
292
tests.login = callTest tests/login.nix {};
293
#tests.logstash = callTest tests/logstash.nix {};
294
tests.mathics = callTest tests/mathics.nix {};
0
295
tests.mesos = callTest tests/mesos.nix {};
296
tests.misc = callTest tests/misc.nix {};
297
tests.mongodb = callTest tests/mongodb.nix {};
···
292
tests.login = callTest tests/login.nix {};
293
#tests.logstash = callTest tests/logstash.nix {};
294
tests.mathics = callTest tests/mathics.nix {};
295
+
tests.matrix-synapse = callTest tests/matrix-synapse.nix {};
296
tests.mesos = callTest tests/mesos.nix {};
297
tests.misc = callTest tests/misc.nix {};
298
tests.mongodb = callTest tests/mongodb.nix {};
+30
nixos/tests/matrix-synapse.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
import ./make-test.nix ({ pkgs, ... } : {
2
+
3
+
name = "matrix-synapse";
4
+
meta = with pkgs.stdenv.lib.maintainers; {
5
+
maintainers = [ corngood ];
6
+
};
7
+
8
+
nodes = {
9
+
server_postgres = args: {
10
+
services.matrix-synapse.enable = true;
11
+
services.matrix-synapse.database_type = "psycopg2";
12
+
};
13
+
14
+
server_sqlite = args: {
15
+
services.matrix-synapse.enable = true;
16
+
services.matrix-synapse.database_type = "sqlite3";
17
+
};
18
+
};
19
+
20
+
testScript = ''
21
+
startAll;
22
+
$server_postgres->waitForUnit("matrix-synapse.service");
23
+
$server_postgres->waitUntilSucceeds("curl -Lk https://localhost:8448/");
24
+
$server_postgres->requireActiveUnit("postgresql.service");
25
+
$server_sqlite->waitForUnit("matrix-synapse.service");
26
+
$server_sqlite->waitUntilSucceeds("curl -Lk https://localhost:8448/");
27
+
$server_sqlite->mustSucceed("[ -e /var/lib/matrix-synapse/homeserver.db ]");
28
+
'';
29
+
30
+
})