My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/nixos/tests/hbase.nix

30 lines
842 B

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