nixos/nexus: port test to python test-driver

This commit is contained in:
Maximilian Bosch 2019-11-24 23:57:24 +01:00
parent 4273a6adcc
commit 9a2c7caa43
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -3,7 +3,7 @@
# 2. nexus service can startup on server (creating database and all other initial stuff) # 2. nexus service can startup on server (creating database and all other initial stuff)
# 3. the web application is reachable via HTTP # 3. the web application is reachable via HTTP
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "nexus"; name = "nexus";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ironpinguin ma27 ]; maintainers = [ ironpinguin ma27 ];
@ -22,11 +22,11 @@ import ./make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll; start_all()
$server->waitForUnit("nexus"); server.wait_for_unit("nexus")
$server->waitForOpenPort(8081); server.wait_for_open_port(8081)
$server->succeed("curl -f 127.0.0.1:8081"); server.succeed("curl -f 127.0.0.1:8081")
''; '';
}) })