Revision 845b7ed1 test/py/cmdlib/instance_unittest.py

b/test/py/cmdlib/instance_unittest.py
1106 1106
        disk_template, disk_info, 2, disk_template,
1107 1107
        file_storage_dir="/tmp", file_driver=constants.FD_BLKTAP)
1108 1108

  
1109
      self.assertEqual(map(operator.attrgetter("logical_id"), result), [
1110
        (constants.FD_BLKTAP, "/tmp/disk2"),
1111
        (constants.FD_BLKTAP, "/tmp/disk3"),
1112
        (constants.FD_BLKTAP, "/tmp/disk4"),
1113
        ])
1109
      if disk_template == constants.DT_GLUSTER:
1110
        # Here "inst21662.example.com" is actually the instance UUID, not its
1111
        # name, so while this result looks wrong, it is actually correct.
1112
        expected = [(constants.FD_BLKTAP,
1113
                     'ganeti/inst21662.example.com.%d' % x)
1114
                    for x in (2,3,4)]
1115
      else:
1116
        expected = [(constants.FD_BLKTAP,
1117
                     '/tmp/disk%d' % x)
1118
                    for x in (2,3,4)]
1119

  
1120
      self.assertEqual(map(operator.attrgetter("logical_id"), result),
1121
                       expected)
1114 1122

  
1115 1123
  def testBlock(self):
1116 1124
    disk_info = [{

Also available in: Unified diff