summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorThierry Carrez <thierry@openstack.org>2011-09-12 14:30:56 +0200
committerThierry Carrez <thierry@openstack.org>2011-09-12 14:30:56 +0200
commitcd5084f8a69b0e2a14f01aa9a4f3d8588a83c923 (patch)
treee7a35d0013be644c98ef48fd5046b3eab7d03a3c /nova/tests
parent67a2445265c8bce704802935b83c6e1ece805332 (diff)
Fix rogue usage of 'sudo' bypassing the run_as_root=True method
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_libvirt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index 8c6775b29..fea2b7cd3 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -743,7 +743,7 @@ class LibvirtConnTestCase(test.TestCase):
# qemu-img should be mockd since test environment might not have
# large disk space.
self.mox.StubOutWithMock(utils, "execute")
- utils.execute('sudo', 'qemu-img', 'create', '-f', 'raw',
+ utils.execute('qemu-img', 'create', '-f', 'raw',
'%s/%s/disk' % (tmpdir, instance_ref.name), '10G')
self.mox.ReplayAll()
@@ -795,7 +795,7 @@ class LibvirtConnTestCase(test.TestCase):
os.path.getsize("/test/disk").AndReturn(10 * 1024 * 1024 * 1024)
# another is qcow image, so qemu-img should be mocked.
self.mox.StubOutWithMock(utils, "execute")
- utils.execute('sudo', 'qemu-img', 'info', '/test/disk.local').\
+ utils.execute('qemu-img', 'info', '/test/disk.local').\
AndReturn((ret, ''))
self.mox.ReplayAll()