Make the tests run
The run_tests.sh was just blindly copied from tuskar_ui and didn't work properly or run the local tests. This patch fixes the paths and adds local settings.py file that loads both plugins. Change-Id: I1b6c0a7a149201325638db39196f3c113a881820
This commit is contained in:
parent
a0c2251fb4
commit
b3c49ab78a
@ -1,3 +1 @@
|
||||
pbr>=0.6,!=0.7,<1.0
|
||||
horizon
|
||||
tuskar-ui
|
||||
|
15
run_tests.sh
15
run_tests.sh
@ -54,7 +54,7 @@ function usage {
|
||||
root=`pwd`
|
||||
venv=$root/.venv
|
||||
with_venv=tools/with_venv.sh
|
||||
included_dirs="tuskar_ui"
|
||||
included_dirs="tuskar_sat_ui tuskar_boxes"
|
||||
|
||||
always_venv=0
|
||||
backup_env=0
|
||||
@ -145,12 +145,13 @@ function run_pylint {
|
||||
|
||||
function run_jshint {
|
||||
echo "Running jshint ..."
|
||||
jshint tuskar_ui/infrastructure/static/infrastructure
|
||||
jshint tuskar_boxes
|
||||
jshint tuskar_sat_ui
|
||||
}
|
||||
|
||||
function run_pep8 {
|
||||
echo "Running flake8 ..."
|
||||
DJANGO_SETTINGS_MODULE=tuskar_ui.test.settings ${command_wrapper} flake8 $included_dirs
|
||||
DJANGO_SETTINGS_MODULE=test.settings ${command_wrapper} flake8 $included_dirs
|
||||
}
|
||||
|
||||
function run_sphinx {
|
||||
@ -310,13 +311,13 @@ function run_tests_subset {
|
||||
}
|
||||
|
||||
function run_tests_all {
|
||||
echo "Running Tuskar-UI application tests"
|
||||
export NOSE_XUNIT_FILE=tuskar_ui/nosetests.xml
|
||||
echo "Running Tuskar-UI-Extras application tests"
|
||||
export NOSE_XUNIT_FILE=test/nosetests.xml
|
||||
if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
|
||||
export NOSE_HTML_OUT_FILE='tuskar_ui_nose_results.html'
|
||||
export NOSE_HTML_OUT_FILE='tuskar_ui_extras_nose_results.html'
|
||||
fi
|
||||
${command_wrapper} ${COVERAGE_CMD} erase
|
||||
${command_wrapper} ${COVERAGE_CMD} run -p $root/manage.py test tuskar_ui --settings=tuskar_ui.test.settings $testopts
|
||||
${command_wrapper} ${COVERAGE_CMD} run -p $root/manage.py test tuskar_boxes tuskar_sat_ui --settings=test.settings $testopts
|
||||
# get results of the Horizon tests
|
||||
TUSKAR_UI_RESULT=$?
|
||||
|
||||
|
@ -20,4 +20,4 @@ docutils==0.9.1
|
||||
oslosphinx
|
||||
|
||||
http://tarballs.openstack.org/horizon/horizon-master.tar.gz#egg=horizon
|
||||
http://tarballs.openstack.org/horizon/tuskar-ui-master.tar.gz#egg=tuskar-ui
|
||||
http://tarballs.openstack.org/tuskar-ui/tuskar-ui-master.tar.gz#egg=tuskar-ui
|
||||
|
0
test/__init__.py
Normal file
0
test/__init__.py
Normal file
1
test/enabled/_60_tuskar_boxes.py
Symbolic link
1
test/enabled/_60_tuskar_boxes.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../_60_tuskar_boxes.py.example
|
1
test/enabled/_60_tuskar_sat_ui.py
Symbolic link
1
test/enabled/_60_tuskar_sat_ui.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../_60_tuskar_sat_ui.py.example
|
0
test/enabled/__init__.py
Normal file
0
test/enabled/__init__.py
Normal file
9
test/settings.py
Normal file
9
test/settings.py
Normal file
@ -0,0 +1,9 @@
|
||||
import openstack_dashboard.enabled
|
||||
from openstack_dashboard.utils import settings
|
||||
import test.enabled
|
||||
from tuskar_ui.test.settings import * # noqa
|
||||
|
||||
|
||||
INSTALLED_APPS = list(INSTALLED_APPS) # Make sure it's mutable
|
||||
settings.update_dashboards([openstack_dashboard.enabled, test.enabled],
|
||||
HORIZON_CONFIG, INSTALLED_APPS)
|
Loading…
Reference in New Issue
Block a user