nixosTests.pgmanage: Port tests to python
This commit is contained in:
parent
1bf1ec35bc
commit
a20683acbe
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ... } :
|
import ./make-test-python.nix ({ pkgs, ... } :
|
||||||
let
|
let
|
||||||
role = "test";
|
role = "test";
|
||||||
password = "secret";
|
password = "secret";
|
||||||
|
@ -29,11 +29,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
$one->waitForUnit("default.target");
|
one.wait_for_unit("default.target")
|
||||||
$one->requireActiveUnit("pgmanage.service");
|
one.require_unit_state("pgmanage.service", "active")
|
||||||
|
|
||||||
# Test if we can log in.
|
# 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"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue