From 0b5418f991a0cfe6c3c3bb0bb43ff6e018b14f6b Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Tue, 9 Jul 2024 10:53:06 -0300 Subject: [PATCH] fixup! utils: Rewrite run-tests.sh to use functions and extenal scripts --- utils/setup_test_container.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/utils/setup_test_container.sh b/utils/setup_test_container.sh index e4f3ac289c..51434081d7 100755 --- a/utils/setup_test_container.sh +++ b/utils/setup_test_container.sh @@ -107,19 +107,21 @@ log info "Testing kinit with admin." # shellcheck disable=SC2154 log info "Creating inventory." make_inventory "${scenario}" "${engine}" "${ansible_interpreter:-"/usr/bin/python3"}" -if [ -z "${inventory}" ] +if [ -z "${inventory:-''}" ] then log error "Could not create inventory file." else + # shellcheck disable=SC2154 log info "Inventory path: [${inventory}]" # shellcheck disable=SC2154 log debug "$(cat "${inventory}")" if [ "${ansible_test}" == "yes" ] then - log info "Testing Asnible connection." - run_if_exists ansible_ping "${inventory}" - log info "Querying installed software" - run_if_exists query_container_installed_software + log info "Testing Ansible connection." + # shellcheck disable=SC2154 + run_if_exists ansible_ping "${inventory}" + log info "Querying installed software" + run_if_exists query_container_installed_software fi fi