def test_top_volume(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) actual = drive.volume_target( "00000000-0000-0000-0000-000000000000", self.actual_chain) self.assertEqual(actual, None)
def test_volume_missing(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) with self.assertRaises(storage.VolumeNotFound): drive.volume_target( "FFFFFFFF-FFFF-FFFF-FFFF-000000000000", self.actual_chain)
def test_base_not_found(self): drive = Drive(self.log, diskType=DISK_TYPE.FILE, **self.conf) with self.assertRaises(storage.VolumeNotFound): drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111", self.actual_chain)
def test_internal_volume(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) actual = drive.volume_target( "11111111-1111-1111-1111-111111111111", self.actual_chain) self.assertEqual(actual, "vda[1]")
def test_volume_missing(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) with pytest.raises(storage.VolumeNotFound): drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-000000000000", self.actual_chain)
def test_top_volume(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) actual = drive.volume_target("00000000-0000-0000-0000-000000000000", self.actual_chain) assert actual is None
def test_internal_volume(self): drive = Drive(self.log, diskType=DISK_TYPE.NETWORK, **self.conf) actual = drive.volume_target("11111111-1111-1111-1111-111111111111", self.actual_chain) assert actual == "vda[1]"
def test_base_not_found(self): drive = Drive(self.log, diskType=DISK_TYPE.FILE, **self.conf) with pytest.raises(storage.VolumeNotFound): drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111", self.actual_chain)
def test_base_not_found(self): drive = Drive(self.log, **self.conf) with self.assertRaises(storage.VolumeNotFound): drive.volume_target("FFFFFFFF-FFFF-FFFF-FFFF-111111111111", self.actual_chain)