Browse Source

Removes testr and switches cover to karma-coverage

This patch removes testr as it is no longer used, switches the
cover job to use the javascript coverage report, and removes
the unused py27integration test environment from tox.ini.

Depends-On: https://review.openstack.org/570260
Change-Id: I44002e46b5a56031520b7144b476d4514aa1e676
changes/42/570442/3
Michael Johnson 3 years ago
committed by Jacky Hu
parent
commit
9f7b22fe7c
  1. 7
      .testr.conf
  2. 1
      lower-constraints.txt
  3. 11
      neutron_lbaas_dashboard/karma.conf.js
  4. 1
      test-requirements.txt
  5. 21
      tox.ini

7
.testr.conf

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

1
lower-constraints.txt

@ -110,7 +110,6 @@ six==1.10.0
statsd==3.2.1
stevedore==1.20.0
tenacity==3.2.1
testrepository==0.0.18
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0

11
neutron_lbaas_dashboard/karma.conf.js

@ -140,7 +140,16 @@ module.exports = function (config) {
coverageReporter: {
type: 'html',
dir: '../coverage-karma/'
dir: '../cover/',
subdir: '.',
check: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100
}
}
},
// Coverage threshold values.

1
test-requirements.txt

@ -10,7 +10,6 @@ python-subunit>=1.0.0 # Apache-2.0/BSD
nose-exclude>=0.3.0 # LGPL
selenium>=2.50.1 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
# This also needs xvfb library installed on your OS

21
tox.ini

@ -8,11 +8,6 @@ usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
CLIENT_NAME=neutron-lbaas-dashboard
DJANGO_SETTINGS_MODULE=neutron_lbaas_dashboard.tests.settings
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -28,18 +23,12 @@ commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:py27integration]
basepython = python2.7
setenv =
{[testenv]setenv}
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=neutron_lbaas_dashboard/tests/integration_tests/horizon.conf
DJANGO_SETTINGS_MODULE=neutron_lbaas_dashboard.tests.settings
commands = nosetests neutron_lbaas_dashboard/tests/integration_tests/tests {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
# npm must be installed on the system, for example
# sudo apt-get install npm
# sudo yum install npm (on RHEL/CentOS, enable EPEL repository)
commands = npm install
npm test
[testenv:docs]
whitelist_externals = rm

Loading…
Cancel
Save