Browse files

functional tests fail if cirros image not exist

The functional tests are looking for a cirros-*uec image and
if that isn't found they fail:

In the function novaclient/tests/functional/base.py:pick_image,
images variable is a generator object which doesn't have
'__getitem__' attribute and so the functional test is failing.

Change-Id: I32b05ff6f2c7501eff04fa9f180eecf3099389ab
Closes-Bug: 1615594
  • Loading branch information...
1 parent e71b536 commit 3b834f25c1d31ef482116344f97b0a1059d9a836 @ukeshkumar ukeshkumar committed Aug 22, 2016
Showing with 4 additions and 2 deletions.
  1. +4 −2 novaclient/tests/functional/base.py
View
6 novaclient/tests/functional/base.py
@@ -60,16 +60,18 @@ def pick_flavor(flavors):
def pick_image(images):
+ firstImage = None
for image in images:
+ firstImage = firstImage or image
if image.name.startswith('cirros') and (
image.name.endswith('-uec') or
image.name.endswith('-disk.img')):
return image
# We didn't find the specific cirros image we'd like to use, so just use
# the first available.
- if images:
- return images[0]
+ if firstImage:
+ return firstImage
raise NoImageException()

0 comments on commit 3b834f2

Please sign in to comment.