diff options
author | Marijan <marijan.petricevic@hotmail.de> | 2019-11-06 21:08:06 +0100 |
---|---|---|
committer | Marijan Petricevic <marijan.petricevic94@gmail.com> | 2019-11-07 10:55:15 +0100 |
commit | f04daa6f382803076d83382bc382cc610699c81e (patch) | |
tree | ff011612a62535fd38eef39876f79058dfbff065 /nixos/tests/dnscrypt-proxy.nix | |
parent | dd188ae2dcd305d7a4dfdcfa7b3c74db171454fc (diff) | |
download | nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar.gz nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar.bz2 nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar.lz nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar.xz nixlib-f04daa6f382803076d83382bc382cc610699c81e.tar.zst nixlib-f04daa6f382803076d83382bc382cc610699c81e.zip |
nixos/dnscrypt-proxy: port test to python
Diffstat (limited to 'nixos/tests/dnscrypt-proxy.nix')
-rw-r--r-- | nixos/tests/dnscrypt-proxy.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/tests/dnscrypt-proxy.nix b/nixos/tests/dnscrypt-proxy.nix index 13bc9d3d9168..98153d5c9047 100644 --- a/nixos/tests/dnscrypt-proxy.nix +++ b/nixos/tests/dnscrypt-proxy.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "dnscrypt-proxy"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ joachifm ]; @@ -23,11 +23,13 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - $client->waitForUnit("dnsmasq"); + client.wait_for_unit("dnsmasq") # The daemon is socket activated; sending a single ping should activate it. - $client->fail("systemctl is-active dnscrypt-proxy"); - $client->execute("${pkgs.iputils}/bin/ping -c1 example.com"); - $client->waitUntilSucceeds("systemctl is-active dnscrypt-proxy"); + client.fail("systemctl is-active dnscrypt-proxy") + client.execute( + "${pkgs.iputils}/bin/ping -c1 example.com" + ) + client.wait_until_succeeds("systemctl is-active dnscrypt-proxy") ''; }) |