Last active
August 29, 2015 14:02
-
-
Save alistairncoles/56bff006e32b0563abc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/unit/obj/test_auditor.py b/test/unit/obj/test_auditor.py | |
index 99b79e2..29db0f7 100644 | |
--- a/test/unit/obj/test_auditor.py | |
+++ b/test/unit/obj/test_auditor.py | |
@@ -244,6 +244,24 @@ class TestAuditor(unittest.TestCase): | |
self.assertEquals(auditor_worker.stats_buckets[10240], 0) | |
self.assertEquals(auditor_worker.stats_buckets['OVER'], 1) | |
+ def test_object_run_logging(self): | |
+ logger = FakeLogger() | |
+ auditor_worker = auditor.AuditorWorker(self.conf, logger, | |
+ self.rcache, self.devices) | |
+ auditor_worker.audit_all_objects(device_dirs=['sda']) | |
+ log_lines = logger.get_lines_for_level('info') | |
+ self.assertTrue(len(log_lines) > 0) | |
+ self.assertTrue(log_lines[0].index('ALL - parallel, sda')) | |
+ | |
+ logger = FakeLogger() | |
+ auditor_worker = auditor.AuditorWorker(self.conf, logger, | |
+ self.rcache, self.devices, | |
+ zero_byte_only_at_fps=50) | |
+ auditor_worker.audit_all_objects(device_dirs=['sda']) | |
+ log_lines = logger.get_lines_for_level('info') | |
+ self.assertTrue(len(log_lines) > 0) | |
+ self.assertTrue(log_lines[0].index('ZBF - sda')) | |
+ | |
def test_object_run_once_no_sda(self): | |
auditor_worker = auditor.AuditorWorker(self.conf, self.logger, | |
self.rcache, self.devices) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment