Revision 6e513917 test/py/ganeti.cmdlib.cluster_unittest.py

b/test/py/ganeti.cmdlib.cluster_unittest.py
81 81
  def testNoNew(self):
82 82
    op_dts = [constants.DT_DISKLESS]
83 83
    old_dts = [constants.DT_DISKLESS]
84
    (enabled_dts, new_dts) =\
84
    (enabled_dts, new_dts, disabled_dts) =\
85 85
        cluster.LUClusterSetParams._GetDiskTemplateSetsInner(
86 86
            op_dts, old_dts)
87 87
    self.assertEqual(enabled_dts, old_dts)
88 88
    self.assertEqual(new_dts, [])
89
    self.assertEqual(disabled_dts, [])
90

  
91
  def testValid(self):
92
    op_dts = [constants.DT_PLAIN, constants.DT_DRBD8]
93
    old_dts = [constants.DT_DISKLESS, constants.DT_PLAIN]
94
    (enabled_dts, new_dts, disabled_dts) =\
95
        cluster.LUClusterSetParams._GetDiskTemplateSetsInner(
96
            op_dts, old_dts)
97
    self.assertEqual(enabled_dts, op_dts)
98
    self.assertEqual(new_dts, [constants.DT_DRBD8])
99
    self.assertEqual(disabled_dts, [constants.DT_DISKLESS])
100

  
89 101

  
90 102

  
91 103
if __name__ == "__main__":

Also available in: Unified diff