]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "Make NFS share selection more intelligent."
authorJenkins <jenkins@review.openstack.org>
Sat, 25 May 2013 04:35:08 +0000 (04:35 +0000)
committerGerrit Code Review <review@openstack.org>
Sat, 25 May 2013 04:35:08 +0000 (04:35 +0000)
1  2 
cinder/tests/test_nfs.py

index 0ffefa3fa8d5ce7e294d9fa1bc5efd534ecbea05,e961018fbddccbedccafffc5ab281d2eb3d4da84..3f967c6f2eb5159300cec23a3569ee087d558644
@@@ -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)
          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)