Exemplo n.º 1
0
 def test_need_replica_chunked_threshold_unset(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.BLOCK, format="cow")
     self.assertTrue(drive.needs_monitoring(events_enabled=True))
Exemplo n.º 2
0
 def test_need_replica_chunked_threshold_exceeded(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.BLOCK, format="cow")
     drive.threshold_state = BLOCK_THRESHOLD.EXCEEDED
     self.assertTrue(drive.needs_monitoring(events_enabled=True))
Exemplo n.º 3
0
 def test_no_need_replica_not_chunked(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.FILE, format="cow")
     self.assertFalse(drive.needs_monitoring(events_enabled=False))
Exemplo n.º 4
0
 def test_need_replica_chunked_threshold_exceeded(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.BLOCK, format="cow")
     drive.threshold_state = BLOCK_THRESHOLD.EXCEEDED
     assert drive.needs_monitoring(events_enabled=True)
Exemplo n.º 5
0
 def test_need_replica_chunked_threshold_unset(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.BLOCK, format="cow")
     assert drive.needs_monitoring(events_enabled=True)
Exemplo n.º 6
0
 def test_no_need_replica_not_chunked(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.FILE, format="cow")
     assert not drive.needs_monitoring(events_enabled=False)
Exemplo n.º 7
0
 def test_no_need_replica_chunked_threshold_set(self):
     conf = drive_config(diskType=DISK_TYPE.FILE, format="cow")
     drive = Drive(self.log, **conf)
     drive.diskReplicate = replica(DISK_TYPE.BLOCK, format="cow")
     drive.threshold_state = BLOCK_THRESHOLD.SET
     assert not drive.needs_monitoring()