Revision 3ae259d3 test/py/ganeti.backend_unittest.py
b/test/py/ganeti.backend_unittest.py | ||
---|---|---|
650 | 650 |
storage_type, self._STORAGE_KEY, self._SOME_ARGS) |
651 | 651 |
|
652 | 652 |
|
653 |
class TestGetLvmVgSpaceInfo(unittest.TestCase): |
|
654 |
|
|
655 |
def testValid(self): |
|
656 |
path = "somepath" |
|
657 |
excl_stor = True |
|
658 |
backend._GetVgInfo = mock.Mock() |
|
659 |
backend._GetLvmVgSpaceInfo(path, [excl_stor]) |
|
660 |
backend._GetVgInfo.assert_called_with(path, excl_stor) |
|
661 |
|
|
662 |
def testNoExclStorageNotBool(self): |
|
663 |
path = "somepath" |
|
664 |
excl_stor = "123" |
|
665 |
self.assertRaises(errors.ProgrammerError, backend._GetLvmVgSpaceInfo, |
|
666 |
path, [excl_stor]) |
|
667 |
|
|
668 |
def testNoExclStorageNotInList(self): |
|
669 |
path = "somepath" |
|
670 |
excl_stor = "123" |
|
671 |
self.assertRaises(errors.ProgrammerError, backend._GetLvmVgSpaceInfo, |
|
672 |
path, excl_stor) |
|
673 |
|
|
674 |
|
|
653 | 675 |
class TestCheckStorageParams(unittest.TestCase): |
654 | 676 |
|
655 | 677 |
def testParamsNone(self): |
Also available in: Unified diff