summaryrefslogtreecommitdiff
path: root/nova
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2014-04-07 08:44:07 -0700
committerMatt Riedemann <mriedem@us.ibm.com>2014-04-07 08:44:18 -0700
commit576d5a90a7521d56080e14a91d162164c45e3aa4 (patch)
treec0b6e23d307b68fec95d8e64b9ce0a07061f0349 /nova
parent541009bb8c7ea5cb0181f9ffceb8a5b96e232ea0 (diff)
downloadnova-576d5a90a7521d56080e14a91d162164c45e3aa4.tar.gz
Remove redundant tests from Qcow2TestCase
Qcow2TestCase had exact copies of two tests in the parent _ImageTestCase so remove them. I'm assuming the tests originated in Qcow2TestCase but later more image types were added and the tests were pulled up into the common parent mixin since they applied to all types of images, but the redundant tests from Qcow2TestCase weren't cleaned up. Related-Bug: #1302211 Change-Id: I031516b555ead5a3769fb62d90e373aac1b6baf1
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/virt/libvirt/test_imagebackend.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/nova/tests/virt/libvirt/test_imagebackend.py b/nova/tests/virt/libvirt/test_imagebackend.py
index d4add89670..41f223231a 100644
--- a/nova/tests/virt/libvirt/test_imagebackend.py
+++ b/nova/tests/virt/libvirt/test_imagebackend.py
@@ -468,48 +468,6 @@ class Qcow2TestCase(_ImageTestCase, test.NoDBTestCase):
driver_format = image.resolve_driver_format()
self.assertEqual(driver_format, 'qcow2')
- def test_prealloc_image(self):
- CONF.set_override('preallocate_images', 'space')
-
- fake_processutils.fake_execute_clear_log()
- fake_processutils.stub_out_processutils_execute(self.stubs)
- image = self.image_class(self.INSTANCE, self.NAME)
-
- def fake_fetch(target, *args, **kwargs):
- return
-
- self.stubs.Set(os.path, 'exists', lambda _: True)
- self.stubs.Set(os, 'access', lambda p, w: True)
-
- # Call twice to verify testing fallocate is only called once.
- image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)
- image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)
-
- self.assertEqual(fake_processutils.fake_execute_get_log(),
- ['fallocate -n -l 1 %s.fallocate_test' % self.PATH,
- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH),
- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH)])
-
- def test_prealloc_image_without_write_access(self):
- CONF.set_override('preallocate_images', 'space')
-
- fake_processutils.fake_execute_clear_log()
- fake_processutils.stub_out_processutils_execute(self.stubs)
- image = self.image_class(self.INSTANCE, self.NAME)
-
- def fake_fetch(target, *args, **kwargs):
- return
-
- self.stubs.Set(image, 'check_image_exists', lambda: True)
- self.stubs.Set(image, '_can_fallocate', lambda: True)
- self.stubs.Set(os.path, 'exists', lambda _: True)
- self.stubs.Set(os, 'access', lambda p, w: False)
-
- # Testing fallocate is only called when user has write access.
- image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)
-
- self.assertEqual(fake_processutils.fake_execute_get_log(), [])
-
class LvmTestCase(_ImageTestCase, test.NoDBTestCase):
VG = 'FakeVG'