HTK: Remove helm test rally user by default following run

This PS updates the helm test script to remove the rally user by
default following a test run.

Change-Id: I5a28244f8f8bd8ef485cb45cc922601d631adff1
Depends-On: https://review.openstack.org/#/c/643206/
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2019-03-13 19:09:09 -05:00 committed by Chris Wedgwood
parent d27e548f8f
commit 8ebb89180f

View File

@ -21,6 +21,16 @@ set -ex
: "${RALLY_ENV_NAME:="openstack-helm"}" : "${RALLY_ENV_NAME:="openstack-helm"}"
: "${OS_INTERFACE:="public"}" : "${OS_INTERFACE:="public"}"
: "${AUTO_REMOVE_USER:="true"}"
if [ "x$AUTO_REMOVE_USER" == "xtrue" ]; then
function remove_rally_user {
openstack user delete \
--domain="${SERVICE_OS_USER_DOMAIN_NAME}" \
"${SERVICE_OS_USERNAME}"
}
trap remove_rally_user EXIT
fi
function create_or_update_db () { function create_or_update_db () {
revisionResults=$(rally db revision) revisionResults=$(rally db revision)