diff --git a/devstack/lib/watcher b/devstack/lib/watcher index ec1da4f45..91d5e8cef 100644 --- a/devstack/lib/watcher +++ b/devstack/lib/watcher @@ -341,6 +341,19 @@ function stop_watcher { done } +# configure_tempest_for_watcher() - Configure Tempest for watcher +function configure_tempest_for_watcher { + # Set default microversion for watcher-tempest-plugin + # Please make sure to update this when the microversion is updated, otherwise + # new tests may be skipped. + TEMPEST_WATCHER_MIN_MICROVERSION=${TEMPEST_WATCHER_MIN_MICROVERSION:-"1.0"} + TEMPEST_WATCHER_MAX_MICROVERSION=${TEMPEST_WATCHER_MAX_MICROVERSION:-"1.4"} + + # Set microversion options in tempest.conf + iniset $TEMPEST_CONFIG optimize min_microversion $TEMPEST_WATCHER_MIN_MICROVERSION + iniset $TEMPEST_CONFIG optimize max_microversion $TEMPEST_WATCHER_MAX_MICROVERSION +} + # Restore xtrace $_XTRACE_WATCHER diff --git a/devstack/plugin.sh b/devstack/plugin.sh index b58b6949b..a6b1f54d1 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -38,6 +38,9 @@ if is_service_enabled watcher-api watcher-decision-engine watcher-applier; then # Start the watcher components echo_summary "Starting watcher" start_watcher + elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then + echo_summary "Configuring tempest for watcher" + configure_tempest_for_watcher fi if [[ "$1" == "unstack" ]]; then