diff --git a/hbase-setup.sh b/hbase-setup.sh index 2f684af..82fd3f8 100755 --- a/hbase-setup.sh +++ b/hbase-setup.sh @@ -37,22 +37,26 @@ download() { create_config() { printf "Writing config\n" - cat < $1 + cat < $2 hbase.rootdir - file://${1}/hbase + file:///${1}/hbase hbase.zookeeper.property.dataDir ${1}/zookeeper + + hbase.unsafe.stream.capability.enforce + false + EOF } check_dependencies download ${HBASE_URL} -create_config "hbase-${HBASE_VERSION}/conf/hbase-site.xml" +create_config "/tmp" "hbase-${HBASE_VERSION}/conf/hbase-site.xml" diff --git a/tests/test_hbase_up.sh b/tests/test_hbase_exporter.sh similarity index 100% rename from tests/test_hbase_up.sh rename to tests/test_hbase_exporter.sh diff --git a/tests/test_hbase_exporter_up.sh b/tests/test_hbase_exporter_up.sh deleted file mode 100644 index 27a4c5f..0000000 --- a/tests/test_hbase_exporter_up.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -setup() { - cd ../ - ./hbase-exporter --zookeeper-server ${ZK_SERVER:-"127.0.0.1:2181"} 2>&1 > /dev/null & - PID=$! - sleep 5 -} - -test_hbase_exporter_up() { - nc -znu -w1 ${1:-"127.0.0.1"} ${2:-"9010"} - curl -s http://127.0.0.1:9010 -} - -test_hbase_exporter_zk_connection() { - r=$(curl -s http://127.0.0.1:9010 | grep '^zookeeper_num_live' | cut -d " " -f2) - assert_not_equals "0.0" "$r" "Zookeeper not live" -} - -teardown() { - kill "$PID" -}