Add tox support
This commit is contained in:
parent
a42230d3c3
commit
7b4a89a333
|
@ -1,3 +1,4 @@
|
|||
.coverage
|
||||
.project
|
||||
.tox
|
||||
bin
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[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 ./ ./unit_tests $LISTOPT $IDOPTION
|
||||
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
|
@ -0,0 +1,28 @@
|
|||
time: 2015-10-30 02:21:00.720250Z
|
||||
tags: worker-0
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_disks
|
||||
time: 2015-10-30 02:21:00.754778Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_disks [ multipart
|
||||
]
|
||||
tags: -worker-0
|
||||
time: 2015-10-30 02:21:00.730741Z
|
||||
tags: worker-1
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_relation_incomplete
|
||||
time: 2015-10-30 02:21:00.758154Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_relation_incomplete [ multipart
|
||||
]
|
||||
tags: -worker-1
|
||||
time: 2015-10-30 02:21:00.743827Z
|
||||
tags: worker-2
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_no_monitor_relation
|
||||
time: 2015-10-30 02:21:00.772254Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_no_monitor_relation [ multipart
|
||||
]
|
||||
tags: -worker-2
|
||||
time: 2015-10-30 02:21:00.755015Z
|
||||
tags: worker-3
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_no_disks
|
||||
time: 2015-10-30 02:21:00.786637Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_no_disks [ multipart
|
||||
]
|
||||
tags: -worker-3
|
|
@ -0,0 +1,28 @@
|
|||
time: 2015-10-30 02:22:03.291297Z
|
||||
tags: worker-0
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_disks
|
||||
time: 2015-10-30 02:22:03.320167Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_disks [ multipart
|
||||
]
|
||||
tags: -worker-0
|
||||
time: 2015-10-30 02:22:03.297768Z
|
||||
tags: worker-3
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_relation_incomplete
|
||||
time: 2015-10-30 02:22:03.324847Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_relation_incomplete [ multipart
|
||||
]
|
||||
tags: -worker-3
|
||||
time: 2015-10-30 02:22:03.309743Z
|
||||
tags: worker-2
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_no_monitor_relation
|
||||
time: 2015-10-30 02:22:03.338165Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_no_monitor_relation [ multipart
|
||||
]
|
||||
tags: -worker-2
|
||||
time: 2015-10-30 02:22:03.304786Z
|
||||
tags: worker-1
|
||||
test: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_no_disks
|
||||
time: 2015-10-30 02:22:03.342692Z
|
||||
successful: unit_tests.test_status.ServiceStatusTestCase.test_assess_status_monitor_complete_no_disks [ multipart
|
||||
]
|
||||
tags: -worker-1
|
|
@ -0,0 +1 @@
|
|||
1
|
|
@ -0,0 +1 @@
|
|||
2
|
Binary file not shown.
|
@ -123,8 +123,8 @@ def config_changed():
|
|||
umount(e_mountpoint)
|
||||
|
||||
osd_journal = config('osd-journal')
|
||||
if (osd_journal and not os.path.exists(JOURNAL_ZAPPED)
|
||||
and os.path.exists(osd_journal)):
|
||||
if (osd_journal and not os.path.exists(JOURNAL_ZAPPED) and
|
||||
os.path.exists(osd_journal)):
|
||||
ceph.zap_disk(osd_journal)
|
||||
with open(JOURNAL_ZAPPED, 'w') as zapped:
|
||||
zapped.write('DONE')
|
||||
|
@ -224,7 +224,7 @@ def update_nrpe_config():
|
|||
description='process check {%s}' % current_unit,
|
||||
check_cmd=('/bin/cat /var/lib/ceph/osd/ceph-*/whoami |'
|
||||
'xargs -I@ status ceph-osd id=@ && exit 0 || exit 2')
|
||||
)
|
||||
)
|
||||
nrpe_setup.write()
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
PyYAML==3.10
|
||||
simplejson==2.3.2
|
||||
netifaces==0.8
|
||||
netaddr==0.7.10
|
||||
Jinja2==2.6
|
||||
six==1.1.0
|
|
@ -0,0 +1,7 @@
|
|||
PyYAML>=3.10
|
||||
simplejson>=3.3.1
|
||||
netifaces>=0.8
|
||||
netaddr>=0.7.10
|
||||
Jinja2>=2.7.2
|
||||
six>=1.5.2
|
||||
dnspython
|
|
@ -0,0 +1,7 @@
|
|||
testtools
|
||||
coverage
|
||||
mock
|
||||
flake8==2.1.0
|
||||
# No version required
|
||||
charm-tools
|
||||
os-testr
|
|
@ -0,0 +1,35 @@
|
|||
[tox]
|
||||
# Default to current LTS
|
||||
envlist = lint,py27-trusty
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
install_command =
|
||||
pip install --allow-unverified python-apt {opts} {packages}
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:py27-precise]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/requirements-precise.txt
|
||||
-r{toxinidir}/requirements/test-requirements.txt
|
||||
|
||||
[testenv:py27-trusty]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/requirements-trusty.txt
|
||||
-r{toxinidir}/requirements/test-requirements.txt
|
||||
|
||||
[testenv:lint]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/requirements-trusty.txt
|
||||
-r{toxinidir}/requirements/test-requirements.txt
|
||||
commands = flake8 {posargs} hooks unit_tests tests
|
||||
charm proof
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E402,E226
|
||||
exclude = hooks/charmhelpers
|
Loading…
Reference in New Issue