nixosTests.hitch: Port tests to python

This commit is contained in:
Christian Kampka 2019-12-16 22:02:36 +01:00
parent 5cb7b2cf60
commit 05587aba8b
No known key found for this signature in database
GPG key ID: B88E140DB4FE1AA5

View file

@ -1,4 +1,4 @@
import ../make-test.nix ({ pkgs, ... }:
import ../make-test-python.nix ({ pkgs, ... }:
{
name = "hitch";
meta = with pkgs.stdenv.lib.maintainers; {
@ -23,11 +23,11 @@ import ../make-test.nix ({ pkgs, ... }:
testScript =
''
startAll;
start_all()
$machine->waitForUnit('multi-user.target');
$machine->waitForUnit('hitch.service');
$machine->waitForOpenPort(443);
$machine->succeed('curl -k https://localhost:443/index.txt | grep "We are all good!"');
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("hitch.service")
machine.wait_for_open_port(443)
assert "We are all good!" in machine.succeed("curl -k https://localhost:443/index.txt")
'';
})