nixpkgs/nixos/tests/hbase.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
864 B
Nix
Raw Normal View History

2022-03-28 20:19:17 +00:00
import ./make-test-python.nix ({ pkgs, lib, package ? pkgs.hbase, ... }:
{
2022-05-07 12:30:04 +00:00
name = "hbase-standalone";
2022-03-28 20:19:17 +00:00
meta = with lib.maintainers; {
maintainers = [ illustris ];
};
nodes = {
hbase = { pkgs, ... }: {
2022-05-07 12:30:04 +00:00
services.hbase-standalone = {
2022-03-28 20:19:17 +00:00
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")
'';
})