Add wrapper around ostestr

The functional tests assume that an openrc file has been sourced. Make a
simple wrapper that will do that.

Change-Id: I42584aaebcbca99a8c922f6ff90c8bbce57bbfbb
This commit is contained in:
Monty Taylor 2017-10-22 16:11:39 +02:00 committed by Dean Troyer
parent 161c79f703
commit ef595fcfc4
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#!/bin/bash
# This is a script that runs ostestr with the openrc OS_ variables sourced.
# Do not run this script unless you know what you're doing.
# For more information refer to:
# https://docs.openstack.org/python-openstackclient/latest/
# Source environment variables to kick things off
if [ -f ~stack/devstack/openrc ] ; then
source ~stack/devstack/openrc admin admin
fi
echo 'Running tests with:'
env | grep OS
ostestr $*

View File

@ -56,6 +56,10 @@ commands =
[testenv:functional]
setenv = OS_TEST_PATH=./openstackclient/tests/functional
passenv = OS_*
# Enable this when running Zuul v3 jobs
#whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
#commands =
# {toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
[testenv:functional-tips]
setenv = OS_TEST_PATH=./openstackclient/tests/functional