Add designate-manage path to tempest via a devstack script

So far, designate-manage was available to use in
designate-tempest-plugin tests, but its path was not well known.

This patch adds a devstack script that would set a tempest.conf setting
for the designate-manage path.

Change-Id: I26203522aaee9bb498bea9a1561eee65f6588244
This commit is contained in:
Omer 2024-05-29 14:06:32 +02:00 committed by Omer Schwartz
parent a9f39f33e8
commit 070e4cb6bf
4 changed files with 61 additions and 0 deletions

View File

@ -87,6 +87,9 @@ DnsFeatureGroup = [
default=False,
help="Is https://bugs.launchpad.net/designate/+bug/1932026 "
"fixed"),
cfg.StrOpt('designate_manage_path',
default=None,
help="The designate-manage command path"),
# Note: Also see the enforce_scope section (from tempest) for Designate API
# scope checking setting.
cfg.BoolOpt('enforce_new_defaults',

17
devstack/README.rst Normal file
View File

@ -0,0 +1,17 @@
====================
Enabling in Devstack
====================
1. Download DevStack::
git clone https://opendev.org/openstack/devstack.git
cd devstack
2. Add this repo as an external repository::
> cat local.conf
[[local|localrc]]
enable_plugin designate-tempest-plugin https://opendev.org/openstack/designate-tempest-plugin
3. run ``stack.sh``

38
devstack/plugin.sh Normal file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
saveenv=$-
set -e
# install_designate_tempest_plugin
function install_designate_tempest_plugin {
setup_dev_lib "designate-tempest-plugin"
}
function _configure_tempest {
if [ -n "$DESIGNATE_BIN_DIR" ]; then
iniset $TEMPEST_CONFIG dns_feature_enabled designate_manage_path ${DESIGNATE_BIN_DIR}/designate-manage
fi
}
if [[ "$1" == "stack" ]]; then
case "$2" in
install)
# Install dev library if the user explicitly requests it
# (INSTALL_TEMPEST=True)
if [[ "$(trueorfalse False INSTALL_TEMPEST)" == "True" ]]; then
echo_summary "Installing designate-tempest-plugin"
install_designate_tempest_plugin
fi
;;
test-config)
echo_summary "Configuring tempest designate-manage"
_configure_tempest
;;
esac
fi
if [[ $saveenv =~ e ]]; then
set -e
else
set +e
fi

3
devstack/settings Normal file
View File

@ -0,0 +1,3 @@
GITREPO["designate-tempest-plugin"]=${DESIGNATE_TEMPEST_REPO:-${GIT_BASE}/openstack/designate-tempest-plugin.git}
GITDIR["designate-tempest-plugin"]=$DEST/designate-tempest-plugin
GITBRANCH["designate-tempest-plugin"]=${DESIGNATE_TEMPEST_REF:-master}