ceph / ceph-medic

find common issues in ceph clusters
MIT License
22 stars 18 forks source link

Added check for cluster osd nearfull - issue #5 resolution #139

Closed gabriellasroman closed 5 years ago

gabriellasroman commented 5 years ago
alfredodeza commented 5 years ago

The added function needs to be patched to avoid problems, after applying this the tests passed for me:

diff --git a/ceph_medic/tests/test_collector.py b/ceph_medic/tests/test_collector.py
index 80bb238..b3c7ab4 100644
--- a/ceph_medic/tests/test_collector.py
+++ b/ceph_medic/tests/test_collector.py
@@ -130,6 +130,7 @@ class TestCollect(object):
             return dict(meta="data")
         monkeypatch.setattr(collector, "get_connection", lambda host: Mock())
         monkeypatch.setattr(collector, "get_node_metadata", mock_metadata)
+        monkeypatch.setattr(collector, "collect_cluster", lambda x: {})
         collector.collect()
         assert "mon0" in metadata["mons"]
         assert "meta" in metadata["mons"]["mon0"]
gabriellasroman commented 5 years ago

Added, thank you!