Unmount image into teardown instead of teardonwclass

We make loop mount of OS-image in some cases into .setup() method. But,
by mistake, umount happened only in teardownclass.

Change-Id: I14e05f6aa943e42344cb53d472f1703ccc9ad7b5
This commit is contained in:
Dmitry Bogun 2016-12-12 17:57:36 +02:00 committed by Andrii Ostapenko
parent cb1c3ff4f7
commit 25b14a7f9c
1 changed files with 2 additions and 1 deletions

View File

@ -125,12 +125,12 @@ class Environment(object):
self.network.remove_node(self.node)
self.node.kill()
self._delete_node_workdir(self.node)
self._teardown_rsync()
def teardownclass(self):
"""Global tear down - single for all tests"""
LOG.info("Tearing down Environment class...")
self._teardown_webserver()
self._teardown_rsync()
self.network.kill()
self._delete_workdir()
@ -271,6 +271,7 @@ class Environment(object):
if self.image_mount_point:
sh.sudo.umount(self.image_mount_point)
sh.rmdir(self.image_mount_point)
self.image_mount_point = None
@classmethod
def _load_config(cls, path):