TEST_LOCAL_PATH = '/mnt/nfs/volume-123'
TEST_FILE_NAME = 'test.txt'
TEST_SHARES_CONFIG_FILE = '/etc/cinder/test-shares.conf'
- ONE_GB_IN_BYTES = 1024 * 1024 * 1024
def setUp(self):
+ super(NfsDriverTestCase, self).setUp()
self._mox = mox_lib.Mox()
self.stubs = stubout.StubOutForTesting()
self.configuration = mox_lib.MockObject(conf.Configuration)
self.configuration.nfs_shares_config = None
self.configuration.nfs_mount_options = None
self.configuration.nfs_mount_point_base = '$state_path/mnt'
- self.configuration.nfs_disk_util = 'df'
self.configuration.nfs_sparsed_volumes = True
+ self.configuration.nfs_used_ratio = 0.95
+ self.configuration.nfs_oversub_ratio = 1.0
self._driver = nfs.NfsDriver(configuration=self.configuration)
self._driver.shares = {}
-
- def tearDown(self):
- self._mox.UnsetStubs()
- self.stubs.UnsetAll()
+ self.addCleanup(self.stubs.UnsetAll)
+ self.addCleanup(self._mox.UnsetStubs)
def stub_out_not_replaying(self, obj, attr_name):
attr_to_replace = getattr(obj, attr_name)