diff --git a/devstack/lib/watcher b/devstack/lib/watcher index 0d9e07355..e3543b5a0 100644 --- a/devstack/lib/watcher +++ b/devstack/lib/watcher @@ -262,6 +262,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 17d6c1780..f58302080 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -36,6 +36,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