1 import ./make-test-python.nix ({ pkgs, ...} :
4 perlEnv = pkgs.perl.withPackages (p: [p.NetZooKeeper]);
8 meta = with pkgs.lib.maintainers; {
9 maintainers = [ nequissimus ztzg ];
14 services.zookeeper = {
18 networking.firewall.allowedTCPPorts = [ 2181 ];
25 server.wait_for_unit("zookeeper")
26 server.wait_for_unit("network.target")
27 server.wait_for_open_port(2181)
29 server.wait_until_succeeds(
30 "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar"
32 server.wait_until_succeeds(
33 "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello"
35 server.wait_until_succeeds(
36 "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello"
39 server.wait_until_succeeds(
40 "${perlEnv}/bin/perl -E 'use Net::ZooKeeper qw(:acls); $z=Net::ZooKeeper->new(q(localhost:2181)); $z->create(qw(/perl foo acl), ZOO_OPEN_ACL_UNSAFE) || die $z->get_error()'"
42 server.wait_until_succeeds(
43 "${perlEnv}/bin/perl -E 'use Net::ZooKeeper qw(:acls); $z=Net::ZooKeeper->new(q(localhost:2181)); $z->get(qw(/perl)) eq qw(foo) || die $z->get_error()'"