nixos/zookeeper: port test to python
This commit is contained in:
parent
49914d7d8b
commit
13febec464
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "zookeeper";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -15,14 +15,20 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$server->waitForUnit("zookeeper");
|
||||
$server->waitForUnit("network.target");
|
||||
$server->waitForOpenPort(2181);
|
||||
server.wait_for_unit("zookeeper")
|
||||
server.wait_for_unit("network.target")
|
||||
server.wait_for_open_port(2181)
|
||||
|
||||
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar");
|
||||
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello");
|
||||
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello");
|
||||
server.wait_until_succeeds(
|
||||
"${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar"
|
||||
)
|
||||
server.wait_until_succeeds(
|
||||
"${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello"
|
||||
)
|
||||
server.wait_until_succeeds(
|
||||
"${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user