diff options
author | Marijan <marijan.petricevic94@gmail.com> | 2019-11-05 00:35:20 +0100 |
---|---|---|
committer | Marijan <marijan.petricevic@hotmail.de> | 2019-11-05 12:00:26 +0100 |
commit | daa97862b58ce768f1f8317df8831f64a2bf25b2 (patch) | |
tree | c9121b5c68b6afe90f1a5a9ac31b14b14aaa2ada /nixos/tests/tor.nix | |
parent | b786c1be04639fe19eabdfee09a923eab1c41984 (diff) |
nixos/tor: port test to python
Diffstat (limited to 'nixos/tests/tor.nix')
-rw-r--r-- | nixos/tests/tor.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix index 0cb44ddff2485..ad07231557c3c 100644 --- a/nixos/tests/tor.nix +++ b/nixos/tests/tor.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ... }: with lib; +import ./make-test-python.nix ({ lib, ... }: with lib; rec { name = "tor"; @@ -21,8 +21,10 @@ rec { }; testScript = '' - $client->waitForUnit("tor.service"); - $client->waitForOpenPort(9051); - $client->succeed("echo GETINFO version | nc 127.0.0.1 9051") =~ /514 Authentication required./ or die; + client.wait_for_unit("tor.service") + client.wait_for_open_port(9051) + assert "514 Authentication required." in client.succeed( + "echo GETINFO version | nc 127.0.0.1 9051" + ) ''; }) |