Get coverage job working
Add a simple test that imports the module so there is coverage data available and fix the coverage config so it is looking at the correct locations.
This commit is contained in:
parent
4f9e87ad24
commit
18b94499d8
@ -1,7 +1,7 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = upgradecheck
|
||||
omit = upgradecheck/tests/*,upgradecheck/openstack/*
|
||||
source = oslo_upgradecheck
|
||||
omit = oslo_upgradecheck/tests/*
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
||||
|
@ -21,8 +21,14 @@ Tests for `upgradecheck` module.
|
||||
|
||||
from oslotest import base
|
||||
|
||||
from oslo_upgradecheck import upgradecheck
|
||||
|
||||
class TestUpgradecheck(base.BaseTestCase):
|
||||
|
||||
def test_something(self):
|
||||
pass
|
||||
class TestUpgradeCheckResult(base.BaseTestCase):
|
||||
|
||||
def test_details(self):
|
||||
result = upgradecheck.UpgradeCheckResult(
|
||||
upgradecheck.UpgradeCheckCode.SUCCESS,
|
||||
'test details')
|
||||
self.assertEqual(0, result.code)
|
||||
self.assertEqual('test details', result.details)
|
||||
|
4
tox.ini
4
tox.ini
@ -34,7 +34,7 @@ commands = {posargs}
|
||||
deps = {[testenv]deps}
|
||||
coverage
|
||||
setenv =
|
||||
PYTHON=coverage run --source $project --parallel-mode
|
||||
PYTHON=coverage run --source oslo_upgradecheck --parallel-mode
|
||||
commands =
|
||||
stestr run '{posargs}'
|
||||
coverage combine
|
||||
@ -46,7 +46,7 @@ install_command = {[testenv:common-constraints]install_command}
|
||||
deps = {[testenv]deps}
|
||||
coverage
|
||||
setenv =
|
||||
PYTHON=coverage run --source $project --parallel-mode
|
||||
PYTHON=coverage run --source oslo_upgradecheck --parallel-mode
|
||||
commands =
|
||||
stestr run '{posargs}'
|
||||
coverage combine
|
||||
|
Loading…
Reference in New Issue
Block a user