Merge lp:~dan-prince/nova/cleanup_test_libvirt_inst_path into lp:~hudson-openstack/nova/trunk

Proposed by Dan Prince
Status: Merged
Approved by: Mark Washenberger
Approved revision: 1119
Merged at revision: 1131
Proposed branch: lp:~dan-prince/nova/cleanup_test_libvirt_inst_path
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 20 lines (+3/-0)
1 file modified
nova/tests/test_libvirt.py (+3/-0)
To merge this branch: bzr merge lp:~dan-prince/nova/cleanup_test_libvirt_inst_path
Reviewer Review Type Date Requested Status
Mark Washenberger (community) Approve
Devin Carlen (community) Approve
Jay Pipes (community) Approve
Review via email: mp+62783@code.launchpad.net

Description of the change

Cleanup instances_path in the test_libvirt test_spawn_with_network_info test. Fixes issue where the nova/tests/instance-00000001/ is left in the nova source tree when running run_test.sh -N.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

lgtm.

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Mark Washenberger (markwash) wrote :

LGTJ (looks good to Jay)

But seriously, this seems to work out fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova/tests/test_libvirt.py'
--- nova/tests/test_libvirt.py 2011-05-19 20:04:37 +0000
+++ nova/tests/test_libvirt.py 2011-05-29 01:14:23 +0000
@@ -18,6 +18,7 @@
18import mox18import mox
19import os19import os
20import re20import re
21import shutil
21import sys22import sys
2223
23from xml.etree.ElementTree import fromstring as xml_to_tree24from xml.etree.ElementTree import fromstring as xml_to_tree
@@ -645,6 +646,8 @@
645 except Exception, e:646 except Exception, e:
646 count = (0 <= str(e.message).find('Unexpected method call'))647 count = (0 <= str(e.message).find('Unexpected method call'))
647648
649 shutil.rmtree(os.path.join(FLAGS.instances_path, instance.name))
650
648 self.assertTrue(count)651 self.assertTrue(count)
649652
650 def test_get_host_ip_addr(self):653 def test_get_host_ip_addr(self):