diff options
author | Christian Kampka <christian@kampka.net> | 2019-12-15 18:48:18 +0100 |
---|---|---|
committer | Christian Kampka <christian@kampka.net> | 2019-12-15 20:08:00 +0100 |
commit | a20683acbef60c0590e6ac6332f7512c6b0284e8 (patch) | |
tree | 4a0cdbab0bebf88f580030bd4f4ea8d7c812e77c /nixos/tests/pgmanage.nix | |
parent | 1bf1ec35bca08d05b06bf6c627b2a1205bdca2ad (diff) | |
download | nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar.gz nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar.bz2 nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar.lz nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar.xz nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.tar.zst nixlib-a20683acbef60c0590e6ac6332f7512c6b0284e8.zip |
nixosTests.pgmanage: Port tests to python
Diffstat (limited to 'nixos/tests/pgmanage.nix')
-rw-r--r-- | nixos/tests/pgmanage.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/tests/pgmanage.nix b/nixos/tests/pgmanage.nix index bacaf3f41588..4f5dbed24a97 100644 --- a/nixos/tests/pgmanage.nix +++ b/nixos/tests/pgmanage.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... } : +import ./make-test-python.nix ({ pkgs, ... } : let role = "test"; password = "secret"; @@ -29,11 +29,13 @@ in }; testScript = '' - startAll; - $one->waitForUnit("default.target"); - $one->requireActiveUnit("pgmanage.service"); + start_all() + one.wait_for_unit("default.target") + one.require_unit_state("pgmanage.service", "active") # Test if we can log in. - $one->waitUntilSucceeds("curl 'http://localhost:8080/pgmanage/auth' --data 'action=login&connname=${conn}&username=${role}&password=${password}' --fail"); + one.wait_until_succeeds( + "curl 'http://localhost:8080/pgmanage/auth' --data 'action=login&connname=${conn}&username=${role}&password=${password}' --fail" + ) ''; }) |