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
1=== modified file 'nova/tests/test_libvirt.py'
2--- nova/tests/test_libvirt.py 2011-05-19 20:04:37 +0000
3+++ nova/tests/test_libvirt.py 2011-05-29 01:14:23 +0000
4@@ -18,6 +18,7 @@
5 import mox
6 import os
7 import re
8+import shutil
9 import sys
10
11 from xml.etree.ElementTree import fromstring as xml_to_tree
12@@ -645,6 +646,8 @@
13 except Exception, e:
14 count = (0 <= str(e.message).find('Unexpected method call'))
15
16+ shutil.rmtree(os.path.join(FLAGS.instances_path, instance.name))
17+
18 self.assertTrue(count)
19
20 def test_get_host_ip_addr(self):