Esempio n. 1
0
 def test_await_attach_volume(self, dev_paths, p_sleep):
     dev_paths.return_value = ['/dev/vda', '/dev/vdb']
     p_sleep.return_value = None
     instance = m.Instance(None, None, None)
     self.assertIsNone(volumes._await_attach_volume(instance, '/dev/vdb'))
     self.assertRaises(RuntimeError, volumes._await_attach_volume,
                       instance, '/dev/vdc')
Esempio n. 2
0
 def test_await_attach_volume(self, dev_paths, p_sleep):
     dev_paths.return_value = ['/dev/vda', '/dev/vdb']
     p_sleep.return_value = None
     instance = r.InstanceResource({'instance_id': '123454321',
                                    'instance_name': 'instt'})
     self.assertIsNone(volumes._await_attach_volume(instance, '/dev/vdb'))
     self.assertRaises(RuntimeError, volumes._await_attach_volume,
                       instance, '/dev/vdc')
Esempio n. 3
0
 def test_await_attach_volume(self, dev_paths, p_sleep):
     dev_paths.return_value = ['/dev/vda', '/dev/vdb']
     p_sleep.return_value = None
     instance = r.InstanceResource({'instance_id': '123454321',
                                    'instance_name': 'instt'})
     self.assertIsNone(volumes._await_attach_volume(instance, '/dev/vdb'))
     self.assertRaises(RuntimeError, volumes._await_attach_volume,
                       instance, '/dev/vdc')