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
This commit is contained in:
Slawek Kaplonski 2018-06-28 13:03:04 +02:00
parent a394fad4e2
commit eb70a96ee3
1 changed files with 3 additions and 1 deletions

View File

@ -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')