From daa97862b58ce768f1f8317df8831f64a2bf25b2 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:35:20 +0100 Subject: [PATCH] nixos/tor: port test to python --- nixos/tests/tor.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix index 0cb44ddff24..ad07231557c 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" + ) ''; })