Allow users to disable the tests run by Grenade

Setting RUN_HEAT_INTEGRATION_TESTS=False disables the Heat
integration tests which are normally executed by Grenade
after the deployment of the base environment and after the upgrade.
This is useful when Heat is used in a Grenade job of another
component, where the focus of the testing is not Heat itself,
thus shortening the run-time of the overall Grenade job.

The default behavior is unchanged.

Change-Id: I47b258fecd45ebc08c82df179625bcfb57a32894
This commit is contained in:
Luigi Toscano 2019-03-01 22:47:28 +01:00
parent 6e89926921
commit 2b580f4258
2 changed files with 10 additions and 3 deletions

View File

@ -73,8 +73,10 @@ function _run_heat_integrationtests {
}
function create {
# run heat integration tests instead of tempest smoke before create
_run_heat_integrationtests $BASE_DEVSTACK_DIR
if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then
# run heat integration tests instead of tempest smoke before create
_run_heat_integrationtests $BASE_DEVSTACK_DIR
fi
source $TOP_DIR/openrc admin admin
# creates a tenant for the server
@ -110,7 +112,9 @@ function verify {
_heat_set_user
local side="$1"
if [[ "$side" = "post-upgrade" ]]; then
_run_heat_integrationtests $TARGET_DEVSTACK_DIR
if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then
_run_heat_integrationtests $TARGET_DEVSTACK_DIR
fi
fi
stack_name=$(resource_get heat stack_name)
heat stack-show $stack_name

View File

@ -4,5 +4,8 @@ devstack_localrc base enable_service h-api h-api-cfn h-eng heat tempest
devstack_localrc target enable_service h-api h-api-cfn h-eng heat tempest
BASE_RUN_SMOKE=False
TARGET_RUN_SMOKE=False
# Integration tests may be skipped when heat is not the main
# focus of the testing.
export RUN_HEAT_INTEGRATION_TESTS=$(trueorfalse True RUN_HEAT_INTEGRATION_TESTS)
export HOST_TOPOLOGY=${HOST_TOPOLOGY}