integration_cleanup: Force testcase cleanup to always run 69/18269/1
authorChristian Trautman <ctrautma@redhat.com>
Tue, 9 Aug 2016 20:06:07 +0000 (16:06 -0400)
committerChristian Trautman <ctrautma@redhat.com>
Tue, 9 Aug 2016 20:06:07 +0000 (16:06 -0400)
commitb6921bcb122d9f2f4b17afd78b7bf8b5bc228212
treed540c8c5e83e7a123ad1a5e968217ac587a9492f
parenta9e754b1050b17464d9e77a942068956d872894e
integration_cleanup: Force testcase cleanup to always run

During testcase development on the integration side, if
namespaces are used or veth ports and an exception is raised.
The namespaces and veth ports are not properly cleanup up
because the run_finalize does not get executed.

This patch wraps the testing block in a try block where
a finally will ALWAYS execute the run_finalize thus
preventing the possiblity of leftover testing artifacts.

JIRA: VSPERF-328

Change-Id: I4ea5f29a48b9171f330847f34b5b30ef3ab22f27
Signed-off-by: Christian Trautman <ctrautma@redhat.com>
testcases/integration.py