diff --git a/.coveragerc b/.coveragerc index 0e6369e1..fcfbae91 100644 --- a/.coveragerc +++ b/.coveragerc @@ -4,3 +4,5 @@ exclude_lines = if __name__ == .__main__.: include= hooks/ceph.py + hooks/hooks.py + hooks/utils.py diff --git a/Makefile b/Makefile index 02f8c75d..562ab110 100644 --- a/Makefile +++ b/Makefile @@ -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... diff --git a/unit_tests/test_ceph.py b/unit_tests/test_ceph.py index 2e096082..722b0f0d 100644 --- a/unit_tests/test_ceph.py +++ b/unit_tests/test_ceph.py @@ -121,4 +121,9 @@ 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)