Add tox functional target
Create a formal tox target for functional tests. Also we should not be overriding the user's localrc. Closes-Bug: #1440125 Change-Id: Ide639ea89050cf3e1f1e9e40c687d506998f7587
This commit is contained in:
parent
dbb3769fa3
commit
79ac06cc4b
|
@ -13,13 +13,6 @@ TENANT_VLAN_RANGE=
|
||||||
PHYSICAL_NETWORK=public
|
PHYSICAL_NETWORK=public
|
||||||
OVS_PHYSICAL_BRIDGE=br-ex
|
OVS_PHYSICAL_BRIDGE=br-ex
|
||||||
|
|
||||||
# Credentials
|
|
||||||
ADMIN_PASSWORD=password
|
|
||||||
DATABASE_PASSWORD=password
|
|
||||||
RABBIT_PASSWORD=password
|
|
||||||
SERVICE_PASSWORD=password
|
|
||||||
SERVICE_TOKEN=password
|
|
||||||
|
|
||||||
enable_service rabbit
|
enable_service rabbit
|
||||||
|
|
||||||
# Enable Neutron which is required by Magnum and disable nova-network.
|
# Enable Neutron which is required by Magnum and disable nova-network.
|
||||||
|
|
|
@ -32,20 +32,23 @@ echo_summary "magnum's post_test_hook.sh was called..."
|
||||||
|
|
||||||
sudo pip install -r test-requirements.txt
|
sudo pip install -r test-requirements.txt
|
||||||
|
|
||||||
# Try a command line as a sanity check
|
# Get admin credentials
|
||||||
source ../devstack/accrc/admin/admin
|
pushd ../devstack
|
||||||
|
source openrc admin admin
|
||||||
|
popd
|
||||||
|
|
||||||
echo_summary "Running bay-list"
|
echo_summary "Running bay-list"
|
||||||
magnum --debug bay-list
|
magnum --debug bay-list
|
||||||
|
|
||||||
sudo OS_STDOUT_CAPTURE=-1 OS_STDERR_CAPTURE=-1 OS_TEST_TIMEOUT=500 OS_TEST_LOCK_PATH=${TMPDIR:-'/tmp'} \
|
# Run functional tests
|
||||||
python -m subunit.run discover -t ./ ./magnum/tests/functional | subunit-2to1 | tools/colorizer.py
|
echo "Running magnum functional test suite"
|
||||||
RETVAL=$?
|
sudo -H -u stack tox -e functional
|
||||||
|
EXIT_CODE=$?
|
||||||
# Restore xtrace
|
|
||||||
$XTRACE
|
|
||||||
|
|
||||||
# Save the logs
|
# Save the logs
|
||||||
sudo mv ../logs/* /opt/stack/logs/
|
sudo mv ../logs/* /opt/stack/logs/
|
||||||
|
|
||||||
exit $RETVAL
|
# Restore xtrace
|
||||||
|
$XTRACE
|
||||||
|
|
||||||
|
exit $EXIT_CODE
|
6
tox.ini
6
tox.ini
|
@ -12,6 +12,12 @@ deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:functional]
|
||||||
|
setenv = OS_TEST_PATH=./magnum/tests/functional
|
||||||
|
OS_TEST_TIMEOUT=500
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue