Skip to content

Commit

Permalink
fixup! utils: Rewrite run-tests.sh to use functions and extenal scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Jul 9, 2024
1 parent 8f3899c commit 0b5418f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions utils/setup_test_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b5418f

Please sign in to comment.