Print more info during compatibility test (#440)

* Print more info during compatibility test

Prints a summary of the environments to be tested and their
corresponding version tags.
This commit is contained in:
Weimin Yu 2020-01-10 15:52:27 -05:00 committed by GitHub
parent b7c1a47e84
commit df5d91f335

View file

@ -146,17 +146,22 @@ if [[ ! -z "${ENV}" ]] && [[ "${ENV}" != "sandbox" ]] \
exit 1 exit 1
fi fi
echo "Testing ${SUT} against deployed ${DEPLOYED_SYSTEM} versions:"
if [[ -z "${ENV}" ]]; then if [[ -z "${ENV}" ]]; then
SANDBOX_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} sandbox ${DEV_PROJECT}) SANDBOX_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} sandbox ${DEV_PROJECT})
PROD_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} production ${DEV_PROJECT}) PROD_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} production ${DEV_PROJECT})
if [[ ${SANDBOX_VERSION} = ${PROD_VERSION} ]]; then if [[ ${SANDBOX_VERSION} = ${PROD_VERSION} ]]; then
VERSIONS=(${PROD_VERSION}) VERSIONS=(${PROD_VERSION})
echo "- sandbox and production at ${PROD_VERSION}"
else else
VERSIONS=(${PROD_VERSION} ${SANDBOX_VERSION}) VERSIONS=(${PROD_VERSION} ${SANDBOX_VERSION})
echo "- sandbox at ${SANDBOX_VERSION}"
echo "- production at ${PROD_VERSION}"
fi fi
else else
TARGET_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} ${ENV} ${DEV_PROJECT}) TARGET_VERSION=$(fetchVersion ${DEPLOYED_SYSTEM} ${ENV} ${DEV_PROJECT})
VERSIONS=(${TARGET_VERSION}) VERSIONS=(${TARGET_VERSION})
echo "- ${ENV} at ${TARGET_VERSION}"
fi fi
for v in ${VERSIONS[@]}; do for v in ${VERSIONS[@]}; do