Ensure root device is listed in block device mappings

This commit is contained in:
Nuwan Goonasekera 2017-09-15 21:30:32 +05:30
commit c116c57eb8
2 changed files with 5 additions and 1 deletions

View file

@ -57,6 +57,10 @@ def test_ami_create_and_delete():
"Auto-created snapshot for AMI {0}".format(image.id))
snapshot.volume_id.should.equal(volume.id)
# root device should be in AMI's block device mappings
root_mapping = image.block_device_mapping.get(image.root_device_name)
root_mapping.should_not.be.none
# Deregister
with assert_raises(EC2ResponseError) as ex:
success = conn.deregister_image(image_id, dry_run=True)