Merge "test_create_server_from_volume_snapshot: assert dict is not empty before accessing a key"

This commit is contained in:
Jenkins 2017-02-10 15:56:06 +00:00 committed by Gerrit Code Review
commit 88d84e951b

View File

@ -196,6 +196,8 @@ class TestVolumeBootPattern(manager.ScenarioTest):
# The created volume when creating a server from a snapshot
created_volume = server_info['os-extended-volumes:volumes_attached']
self.assertNotEmpty(created_volume, "No volume attachment found.")
created_volume_info = self.volumes_client.show_volume(
created_volume[0]['id'])['volume']