<commit_before>import ./make-test.nix ({ pkgs, ...} : {
  name = "zookeeper";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ nequissimus ];
  };

  nodes = {
    server = { ... }: {
      services.zookeeper = {
        enable = true;
      };

      networking.firewall.allowedTCPPorts = [ 2181 ];
    };
  };

  testScript = ''
    startAll;

    $server->waitForUnit("zookeeper");
    $server->waitForUnit("network.target");
    $server->waitForOpenPort(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");
  '';
})
<commit_msg>nixos/zookeeper: port test to python<commit_after>import ./make-test-python.nix ({ pkgs, ...} : {
  name = "zookeeper";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ nequissimus ];
  };

  nodes = {
    server = { ... }: {
      services.zookeeper = {
        enable = true;
      };

      networking.firewall.allowedTCPPorts = [ 2181 ];
    };
  };

  testScript = ''
    start_all()

    server.wait_for_unit("zookeeper")
    server.wait_for_unit("network.target")
    server.wait_for_open_port(2181)

    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"
    )
  '';
})

{'fraction_non_alphanumeric': 0.1620991253644315, 'fraction_numerical': 0.023323615160349854, 'mean_word_length': 2.838926174496644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4195204', 'n_tokens_mistral': 671, 'n_tokens_neox': 613, 'n_words': 89}