From eb70a96ee3f7e56dbf57aefa2a1aa768aeb559ab Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 28 Jun 2018 13:03:04 +0200 Subject: [PATCH] Add additional log of meta_data devices content In TaggedAttachmentsTest.test_tagged_attachment test there is now added some additional debug log to check what devices are still in meta_data's devices field when it should be empty already. This patch changes also from handling all exeptions to only AssertionError in verify_empty_devices() method. If exeption other than AssertionError occur, it will not be silently ignored anymore. Change-Id: I95016e35102569fba79fc58f9695e480234619dc Related-Bug: #1775947 --- tempest/api/compute/servers/test_device_tagging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tempest/api/compute/servers/test_device_tagging.py b/tempest/api/compute/servers/test_device_tagging.py index ff8ed61da3..5d9bf48ab3 100644 --- a/tempest/api/compute/servers/test_device_tagging.py +++ b/tempest/api/compute/servers/test_device_tagging.py @@ -320,7 +320,9 @@ class TaggedAttachmentsTest(DeviceTaggingBase): try: self.assertEmpty(md_dict['devices']) return True - except Exception: + except AssertionError: + LOG.debug("Related bug 1775947. Devices dict is not empty: %s", + md_dict['devices']) return False @decorators.idempotent_id('3e41c782-2a89-4922-a9d2-9a188c4e7c7c')