Misc ceph test fixes

This commit is contained in:
Liam Young 2015-02-10 08:05:05 +00:00
parent cbfd001c8c
commit 5788c1d90a
3 changed files with 9 additions and 3 deletions

View File

@ -4,3 +4,5 @@ exclude_lines =
if __name__ == .__main__.:
include=
hooks/ceph.py
hooks/hooks.py
hooks/utils.py

View File

@ -6,8 +6,7 @@ lint:
@charm proof
unit_test:
@$(PYTHON) /usr/bin/nosetests unit_tests
# @$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
test:
@echo Starting Amulet tests...

View File

@ -122,3 +122,8 @@ class CephRadosGWCephTests(CharmTestCase):
ceph.import_osd_bootstrap_key('mykey')
self.subprocess.check_call.assert_called_with(cmd)
def test_is_bootstrapped(self):
self.os.path.exists.return_value = True
self.assertEqual(ceph.is_bootstrapped(), True)
self.os.path.exists.return_value = False
self.assertEqual(ceph.is_bootstrapped(), False)