test-client: cleanup after test on failure
Otherwise, the following tests will fail too.
This commit is contained in:
@@ -2175,14 +2175,22 @@ class TestNmCloudSetup(TestNmClient):
|
|||||||
self.md_url = "http://%s:%d" % s.getsockname()
|
self.md_url = "http://%s:%d" % s.getsockname()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
error = None
|
||||||
|
|
||||||
self.srv_start()
|
self.srv_start()
|
||||||
func(self)
|
try:
|
||||||
|
func(self)
|
||||||
|
except Exception as e:
|
||||||
|
error = e
|
||||||
self._nm_test_post()
|
self._nm_test_post()
|
||||||
|
|
||||||
p.stdin.close()
|
p.stdin.close()
|
||||||
p.terminate()
|
p.terminate()
|
||||||
p.wait()
|
p.wait()
|
||||||
|
|
||||||
|
if error:
|
||||||
|
raise error
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
@cloud_setup_test
|
@cloud_setup_test
|
||||||
|
Reference in New Issue
Block a user