Esempio n. 1
0
 def setUp(self):
     super(RuntimeConfigurationTests, self).setUp()
     self.vm_uuid = str(uuid.uuid4())
     self.base = docker.Runtime(self.vm_uuid)
     self.conf = {
         'mem': 4 * 1024 * 1024,  # KiB
         'path': '/random/path/to/disk/image',
         'net': 'ovirtmgmt',
         'runtime': 'docker',
         'image': 'redis',
     }
Esempio n. 2
0
 def test_bridge_no_source(self):
     root = ET.fromstring(conttestlib.bridge_no_source_dom_xml())
     base = docker.Runtime(self.vm_uuid)
     self.assertRaises(xmlfile.ConfigError, base.configure, root)
Esempio n. 3
0
 def test_recover_twice(self):
     rt = docker.Runtime()
     rt.recover()
     self.assertRaises(runner.OperationFailed, rt.recover)
Esempio n. 4
0
 def test_recover_succeed(self):
     rt = docker.Runtime()
     self.assertFalse(rt.running)
     rt.recover()
     self.assertTrue(rt.running)
Esempio n. 5
0
 def test_stop_not_started(self):
     rt = docker.Runtime()
     self.assertFalse(rt.running)
     self.assertRaises(runner.OperationFailed, rt.stop)
Esempio n. 6
0
 def test_created_not_running(self):
     rt = docker.Runtime()
     self.assertFalse(rt.running)
Esempio n. 7
0
 def setUp(self):
     super(RuntimeConfigurationTests, self).setUp()
     self.vm_uuid = str(uuid.uuid4())
     self.base = docker.Runtime(self.vm_uuid)