summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorillustris <rharikrishnan95@gmail.com>2022-03-29 01:49:17 +0530
committerillustris <rharikrishnan95@gmail.com>2022-04-18 02:02:43 +0530
commit2b0c299990e4d2c392e2041240bb05797f23c146 (patch)
tree3cfdbec3c380a1ecbad3fd6137d04643811d8f9e /nixos
parent6701dd6a4dd5b91314a7ea8890620c7b16a0e058 (diff)
downloadnixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar.gz
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar.bz2
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar.lz
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar.xz
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.tar.zst
nixpkgs-2b0c299990e4d2c392e2041240bb05797f23c146.zip
hbase: 0.98.24 -> 2.4.11
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix3
-rw-r--r--nixos/tests/hbase.nix30
2 files changed, 33 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index cb68ef68530..9848487fd13 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -199,6 +199,9 @@ in
   haste-server = handleTest ./haste-server.nix {};
   haproxy = handleTest ./haproxy.nix {};
   hardened = handleTest ./hardened.nix {};
+  hbase1 = handleTest ./hbase.nix { package=pkgs.hbase1; };
+  hbase2 = handleTest ./hbase.nix { package=pkgs.hbase2; };
+  hbase3 = handleTest ./hbase.nix { package=pkgs.hbase3; };
   hedgedoc = handleTest ./hedgedoc.nix {};
   herbstluftwm = handleTest ./herbstluftwm.nix {};
   installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {});
diff --git a/nixos/tests/hbase.nix b/nixos/tests/hbase.nix
new file mode 100644
index 00000000000..a449d24dd6f
--- /dev/null
+++ b/nixos/tests/hbase.nix
@@ -0,0 +1,30 @@
+import ./make-test-python.nix ({ pkgs, lib, package ? pkgs.hbase, ... }:
+{
+  name = "hbase";
+
+  meta = with lib.maintainers; {
+    maintainers = [ illustris ];
+  };
+
+  nodes = {
+    hbase = { pkgs, ... }: {
+      services.hbase = {
+        enable = true;
+        inherit package;
+        # Needed for standalone mode in hbase 2+
+        # This setting and standalone mode are not suitable for production
+        settings."hbase.unsafe.stream.capability.enforce" = "false";
+      };
+      environment.systemPackages = with pkgs; [
+        package
+      ];
+    };
+  };
+
+  testScript = ''
+    start_all()
+    hbase.wait_for_unit("hbase.service")
+    hbase.wait_until_succeeds("echo \"create 't1','f1'\" | sudo -u hbase hbase shell -n")
+    assert "NAME => 'f1'" in hbase.succeed("echo \"describe 't1'\" | sudo -u hbase hbase shell -n")
+  '';
+})