commit | 07c30b2179891447a600c4a20f43cd390b89fac4 | [log] [tgz] |
---|---|---|
author | Qin Zhao <chaochin@gmail.com> | Wed Jul 30 11:35:56 2014 +0800 |
committer | Qin Zhao <chaochin@gmail.com> | Wed Jul 30 11:42:35 2014 +0800 |
tree | 938314a7448f2e5f9008847fac2bb3453584fb52 | |
parent | 4b123ce8012f69612cfbdf37458d30171de9ce64 [diff] |
If no volume, don't delete volume in teardown If exception is thrown in setupClass before volume is created, tearDownClass needn't delete volume. Change-Id: I91c7eff8ec147b0ce3a9ea3e6c8d906ba68412c2 Closes-Bug: 1350167
diff --git a/tempest/api/compute/v3/servers/test_server_rescue_negative.py b/tempest/api/compute/v3/servers/test_server_rescue_negative.py index 5eb6c9a..022c963 100644 --- a/tempest/api/compute/v3/servers/test_server_rescue_negative.py +++ b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
@@ -56,7 +56,8 @@ @classmethod def tearDownClass(cls): - cls.delete_volume(cls.volume['id']) + if hasattr(cls, 'volume'): + cls.delete_volume(cls.volume['id']) super(ServerRescueNegativeV3Test, cls).tearDownClass() def _detach(self, server_id, volume_id):