コード例 #1
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
        config._UpdateIvNames(0, disks)
        self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
コード例 #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), [])
コード例 #3
0
 def testNoError(self):
     disks = self._MakeDisks(["disk/0", "disk/1"])
     self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
     config._UpdateIvNames(0, disks)
     self.assertEqual(config._CheckInstanceDiskIvNames(disks), [])
コード例 #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), [])