nixos/matrix-synapse: Port integration test to python

This commit is contained in:
Jacek Galowicz 2019-11-05 14:35:54 +01:00
parent 9c54658226
commit fdb72f68ad

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... } : let import ./make-test-python.nix ({ pkgs, ... } : let
runWithOpenSSL = file: cmd: pkgs.runCommand file { runWithOpenSSL = file: cmd: pkgs.runCommand file {
@ -55,13 +55,17 @@ in {
}; };
testScript = '' testScript = ''
startAll; start_all()
$serverpostgres->waitForUnit("matrix-synapse.service"); serverpostgres.wait_for_unit("matrix-synapse.service")
$serverpostgres->waitUntilSucceeds("curl -L --cacert ${ca_pem} https://localhost:8448/"); serverpostgres.wait_until_succeeds(
$serverpostgres->requireActiveUnit("postgresql.service"); "curl -L --cacert ${ca_pem} https://localhost:8448/"
$serversqlite->waitForUnit("matrix-synapse.service"); )
$serversqlite->waitUntilSucceeds("curl -L --cacert ${ca_pem} https://localhost:8448/"); serverpostgres.require_unit_state("postgresql.service")
$serversqlite->mustSucceed("[ -e /var/lib/matrix-synapse/homeserver.db ]"); serversqlite.wait_for_unit("matrix-synapse.service")
serversqlite.wait_until_succeeds(
"curl -L --cacert ${ca_pem} https://localhost:8448/"
)
serversqlite.succeed("[ -e /var/lib/matrix-synapse/homeserver.db ]")
''; '';
}) })