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
Michael Johnson 11 months ago
parent
commit
9f7b22fe7c
5 changed files with 15 additions and 26 deletions
  1. 0
    7
      .testr.conf
  2. 0
    1
      lower-constraints.txt
  3. 10
    1
      neutron_lbaas_dashboard/karma.conf.js
  4. 0
    1
      test-requirements.txt
  5. 5
    16
      tox.ini

+ 0
- 7
.testr.conf View File

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

+ 0
- 1
lower-constraints.txt View File

@@ -110,7 +110,6 @@ six==1.10.0
110 110
 statsd==3.2.1
111 111
 stevedore==1.20.0
112 112
 tenacity==3.2.1
113
-testrepository==0.0.18
114 113
 testscenarios==0.4
115 114
 testtools==2.2.0
116 115
 traceback2==1.4.0

+ 10
- 1
neutron_lbaas_dashboard/karma.conf.js View File

@@ -140,7 +140,16 @@ module.exports = function (config) {
140 140
 
141 141
     coverageReporter: {
142 142
       type: 'html',
143
-      dir: '../coverage-karma/'
143
+      dir: '../cover/',
144
+      subdir: '.',
145
+      check: {
146
+        global: {
147
+          statements: 100,
148
+          branches: 100,
149
+          functions: 100,
150
+          lines: 100
151
+        }
152
+      }
144 153
     },
145 154
 
146 155
     // Coverage threshold values.

+ 0
- 1
test-requirements.txt View File

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

+ 5
- 16
tox.ini View File

@@ -8,11 +8,6 @@ usedevelop = True
8 8
 install_command =  pip install {opts} {packages}
9 9
 setenv =
10 10
    VIRTUAL_ENV={envdir}
11
-   NOSE_WITH_OPENSTACK=1
12
-   NOSE_OPENSTACK_COLOR=1
13
-   NOSE_OPENSTACK_RED=0.05
14
-   NOSE_OPENSTACK_YELLOW=0.025
15
-   NOSE_OPENSTACK_SHOW_ELAPSED=1
16 11
    CLIENT_NAME=neutron-lbaas-dashboard
17 12
    DJANGO_SETTINGS_MODULE=neutron_lbaas_dashboard.tests.settings
18 13
 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@@ -28,18 +23,12 @@ commands = flake8
28 23
 [testenv:venv]
29 24
 commands = {posargs}
30 25
 
31
-[testenv:py27integration]
32
-basepython = python2.7
33
-setenv =
34
-   {[testenv]setenv}
35
-   INTEGRATION_TESTS=1
36
-   SELENIUM_HEADLESS=1
37
-   HORIZON_INTEGRATION_TESTS_CONFIG_FILE=neutron_lbaas_dashboard/tests/integration_tests/horizon.conf
38
-   DJANGO_SETTINGS_MODULE=neutron_lbaas_dashboard.tests.settings
39
-commands = nosetests neutron_lbaas_dashboard/tests/integration_tests/tests {posargs}
40
-
41 26
 [testenv:cover]
42
-commands = python setup.py test --coverage --testr-args='{posargs}'
27
+# npm must be installed on the system, for example
28
+# sudo apt-get install npm
29
+# sudo yum install npm (on RHEL/CentOS, enable EPEL repository)
30
+commands = npm install
31
+           npm test
43 32
 
44 33
 [testenv:docs]
45 34
 whitelist_externals = rm

Loading…
Cancel
Save