From 7a2bde57ff896067d747687ac7f83b3ee1264232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Mon, 8 Mar 2021 01:41:14 +0100 Subject: [PATCH] testsuite: Use SCRIPT_PATH --- tests/test_hbase_exporter.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_hbase_exporter.sh b/tests/test_hbase_exporter.sh index d93eeed..e9dfc91 100644 --- a/tests/test_hbase_exporter.sh +++ b/tests/test_hbase_exporter.sh @@ -11,7 +11,8 @@ HDFS_CMD_ZKFC="./hadoop/bin/hdfs --config ${HADOOP_CONFIG_DIR} start zkfc" HDFS_CMD_FORMAT="./hadoop/bin/hdfs --config ${HADOOP_CONFIG_DIR} namenode -format" HDFS_CMD_FORMAT_HA="./hadoop/bin/hdfs --config ${HADOOP_CONFIG_DIR} namenode -initializeSharedEdits" -source setup.sh +SCRIPT_PATH=$(dirname "$0") +source $SCRIPT_PATH/setup.sh setup_suite() { if [ "FreeBSD" = "$(uname)" ]; then @@ -23,7 +24,11 @@ setup_suite() { export HADOOP_PREFIX="$(pwd)/hadoop" # Setup HBase - if ! ./hbase-setup.sh; then + if ! ansible-playbook -i inventory.yml \ + -e "hdfs_config_path=${HADOOP_PREFIX}/etc/hadoop" \ + -e "script_path=$(pwd)" \ + hbase-create.yml; then + printf "Failed to setup HBase to run test suite\n" exit 1 fi @@ -31,7 +36,7 @@ setup_suite() { # Setup HDFS if ! ansible-playbook -i inventory.yml \ -e "hdfs_config_path=$(pwd)/hadoop/etc/hadoop" \ - -e "hadoop_prefix=$(pwd)" \ + -e "script_path=$(pwd)" \ hdfs-create.yml; then printf "Failed to setup HDFS to run test suite\n"