Set Tempest's service_availability setting for Trove

Tempest's service_availability config option includes all the service
availability which is further used by tests to take decision of skip
or run the test.

For example, [service_availability].trove is true then, trove test will run
or if [service_availability].trove is false then, all trove related tests either
in trove tempest plugin or any other plugins will be skipped.

Currently this setting for trove service[1] is in devstack lib/tempest
which is being removed by - https://review.openstack.org/#/c/619973/

For better maintenance, we are moving all tempest non-owned service setting
to service devstack plugin side.

This commit add the setting of trove service on trove devstack plugin.

Closes-Bug: #1743688
[1] https://git.openstack.org/cgit/openstack/trove-tempest-plugin/tree/trove_tempest_plugin/config.py#n17

Needed-By: https://review.openstack.org/#/c/619973/
Change-Id: Ie3c6bab6e0be9dfcfe29ec3f412e704f3ad79d61
This commit is contained in:
ghanshyam 2018-11-26 08:25:23 +00:00 committed by Ghanshyam Mann
parent 7796cab590
commit d5d9342bee

View File

@ -550,6 +550,15 @@ function stop_trove {
done
}
# configure_tempest_for_trove() - Set Trove related setting on Tempest
# NOTE (gmann): Configure all the Tempest setting for Trove service in
# this function.
function configure_tempest_for_trove {
if is_service_enabled tempest; then
iniset $TEMPEST_CONFIG service_available trove True
fi
}
# Dispatcher for trove plugin
if is_service_enabled trove; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
@ -581,6 +590,9 @@ if is_service_enabled trove; then
# Start the trove API and trove taskmgr components
echo_summary "Starting Trove"
start_trove
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
echo_summary "Configuring Tempest for Trove"
configure_tempest_for_trove
fi
if [[ "$1" == "unstack" ]]; then