From: Jenkins Date: Sat, 25 May 2013 04:35:08 +0000 (+0000) Subject: Merge "Make NFS share selection more intelligent." X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=58f3df0072e240d502b5241601ec62c6115e00ac;p=openstack-build%2Fcinder-build.git Merge "Make NFS share selection more intelligent." --- 58f3df0072e240d502b5241601ec62c6115e00ac diff --cc cinder/tests/test_nfs.py index 0ffefa3fa,e961018fb..3f967c6f2 --- a/cinder/tests/test_nfs.py +++ b/cinder/tests/test_nfs.py @@@ -114,10 -117,8 +115,9 @@@ class NfsDriverTestCase(test.TestCase) 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) @@@ -125,12 -126,15 +125,13 @@@ 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)