Revision 2fe1e043 test/py/ganeti.utils.storage_unittest.py
b/test/py/ganeti.utils.storage_unittest.py | ||
---|---|---|
27 | 27 |
|
28 | 28 |
from ganeti import constants |
29 | 29 |
from ganeti import objects |
30 |
from ganeti import pathutils |
|
31 | 30 |
from ganeti.utils import storage |
32 | 31 |
|
33 | 32 |
import testutils |
... | ... | |
39 | 38 |
self._default_vg_name = "some_vg_name" |
40 | 39 |
self._cluster = mock.Mock() |
41 | 40 |
self._cluster.file_storage_dir = "my/file/storage/dir" |
41 |
self._cluster.shared_file_storage_dir = "my/shared/file/storage/dir" |
|
42 | 42 |
self._cfg = mock.Mock() |
43 | 43 |
self._cfg.GetVGName = mock.Mock(return_value=self._default_vg_name) |
44 | 44 |
self._cfg.GetClusterInfo = mock.Mock(return_value=self._cluster) |
... | ... | |
63 | 63 |
storage._GetDefaultStorageUnitForDiskTemplate(self._cfg, |
64 | 64 |
constants.DT_SHARED_FILE) |
65 | 65 |
self.assertEqual(storage_type, constants.ST_FILE) |
66 |
self.assertEqual(storage_key, pathutils.DEFAULT_SHARED_FILE_STORAGE_DIR)
|
|
66 |
self.assertEqual(storage_key, self._cluster.shared_file_storage_dir)
|
|
67 | 67 |
|
68 | 68 |
def testGetDefaultStorageUnitForDiskTemplateDiskless(self): |
69 | 69 |
(storage_type, storage_key) = \ |
Also available in: Unified diff