1import ./make-test-python.nix (
2 {
3 pkgs,
4 lib,
5 package ? pkgs.hbase,
6 ...
7 }:
8 {
9 name = "hbase-standalone";
10
11 meta = with lib.maintainers; {
12 maintainers = [ illustris ];
13 };
14
15 nodes = {
16 hbase =
17 { pkgs, ... }:
18 {
19 services.hbase-standalone = {
20 enable = true;
21 inherit package;
22 # Needed for standalone mode in hbase 2+
23 # This setting and standalone mode are not suitable for production
24 settings."hbase.unsafe.stream.capability.enforce" = "false";
25 };
26 environment.systemPackages = with pkgs; [
27 package
28 ];
29 };
30 };
31
32 testScript = ''
33 start_all()
34 hbase.wait_for_unit("hbase.service")
35 hbase.wait_until_succeeds("echo \"create 't1','f1'\" | sudo -u hbase hbase shell -n")
36 assert "NAME => 'f1'" in hbase.succeed("echo \"describe 't1'\" | sudo -u hbase hbase shell -n")
37 '';
38 }
39)