Revision 1c3231aa test/py/ganeti.hypervisor.hv_lxc_unittest.py
b/test/py/ganeti.hypervisor.hv_lxc_unittest.py | ||
---|---|---|
34 | 34 |
|
35 | 35 |
class TestConsole(unittest.TestCase): |
36 | 36 |
def test(self): |
37 |
instance = objects.Instance(name="lxc.example.com", primary_node="node199") |
|
38 |
cons = hv_lxc.LXCHypervisor.GetInstanceConsole(instance, {}, {}) |
|
37 |
instance = objects.Instance(name="lxc.example.com", |
|
38 |
primary_node="node199-uuid") |
|
39 |
node = objects.Node(name="node199", uuid="node199-uuid") |
|
40 |
cons = hv_lxc.LXCHypervisor.GetInstanceConsole(instance, node, {}, {}) |
|
39 | 41 |
self.assertTrue(cons.Validate()) |
40 | 42 |
self.assertEqual(cons.kind, constants.CONS_SSH) |
41 |
self.assertEqual(cons.host, instance.primary_node)
|
|
43 |
self.assertEqual(cons.host, node.name)
|
|
42 | 44 |
self.assertEqual(cons.command[-1], instance.name) |
43 | 45 |
|
44 | 46 |
|
Also available in: Unified diff