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.

This commit is contained in:
Dan Prince 2011-06-01 14:01:22 +00:00 committed by Tarmac
commit a1e7f08841

View File

@ -18,6 +18,7 @@ import eventlet
import mox
import os
import re
import shutil
import sys
from xml.etree.ElementTree import fromstring as xml_to_tree
@ -645,6 +646,8 @@ class LibvirtConnTestCase(test.TestCase):
except Exception, e:
count = (0 <= str(e.message).find('Unexpected method call'))
shutil.rmtree(os.path.join(FLAGS.instances_path, instance.name))
self.assertTrue(count)
def test_get_host_ip_addr(self):