The api.test_images.ImageTest.test_check_simple_image_attributes test case fails if an AMI type image is used as the test image because it doesn't expect to find any kernel/ramdisk references in the newly created images:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ec2api/tests/functional/api/test_images.py", line 222, in test_check_simple_image_attributes
self.assertNotIn('KernelId', data)
File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 455, in assertNotIn
self.assertThat(haystack, matcher, message)
File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: {u'KernelId': {u'Value': 'aki-3a217fcc'}, 'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': 'req-8849cab1-3891-4571-ae7f-0793a49a3200', 'HTTPHeaders': {'date': 'Mon, 14 Aug 2017 10:06:50 GMT', 'content-length': '271', 'content-type': 'text/xml'}}, u'ImageId': 'ami-017e8511'} matches Contains('KernelId')
The test case should be updated to also allow for AMI image types to be used.
Reviewed: https:/ /review. openstack. org/493510 /git.openstack. org/cgit/ openstack/ ec2-api/ commit/ ?id=41823a515df e2e8eac32c5f23e f722042533be0d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 41823a515dfe2e8 eac32c5f23ef722 042533be0d
Author: Stefan Nica <email address hidden>
Date: Mon Aug 14 12:55:42 2017 +0200
Fix test_check_ simple_ image_attribute s to pass with AMI images
Modify the ec2api. tests.functiona l.api.test_ images. ImageTest. test_check_ simple_ image_attribute s test case to allow AMI image types.
Change-Id: Idc94f84977daca f9e2a3d3968288b c4396507fff
Closes-Bug: #1710597