nixos/tor: port test to python

This commit is contained in:
Marijan
2019-11-05 12:00:26 +01:00
committed by Marijan
parent b786c1be04
commit daa97862b5
+6 -4
View File
@@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ... }: with lib; import ./make-test-python.nix ({ lib, ... }: with lib;
rec { rec {
name = "tor"; name = "tor";
@@ -21,8 +21,10 @@ rec {
}; };
testScript = '' testScript = ''
$client->waitForUnit("tor.service"); client.wait_for_unit("tor.service")
$client->waitForOpenPort(9051); client.wait_for_open_port(9051)
$client->succeed("echo GETINFO version | nc 127.0.0.1 9051") =~ /514 Authentication required./ or die; assert "514 Authentication required." in client.succeed(
"echo GETINFO version | nc 127.0.0.1 9051"
)
''; '';
}) })