def testWrongNames(self):
    disks = self._MakeDisks(["disk/1", "disk/3", "disk/2"])
    self.assertEqual(config._CheckInstanceDiskIvNames(disks), [
      (0, "disk/0", "disk/1"),
      (1, "disk/1", "disk/3"),
      ])

    # Fix names
    _UpdateIvNames(0, disks)
    self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
Beispiel #2
0
  def testWrongNames(self):
    disks = self._MakeDisks(["disk/1", "disk/3", "disk/2"])
    self.assertEqual(config._CheckInstanceDiskIvNames(disks), [
      (0, "disk/0", "disk/1"),
      (1, "disk/1", "disk/3"),
      ])

    # Fix names
    _UpdateIvNames(0, disks)
    self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
 def testNoError(self):
   disks = self._MakeDisks(["disk/0", "disk/1"])
   self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
   _UpdateIvNames(0, disks)
   self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
Beispiel #4
0
 def testNoError(self):
   disks = self._MakeDisks(["disk/0", "disk/1"])
   self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
   _UpdateIvNames(0, disks)
   self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])