Skip to content

Commit f6a9665

Browse files
hanwen-clusterhanwen-pcluste
authored andcommitted
[integ-tests] Improve _get_resources_with_image_resource
When the resource first appears, the PhysicalResourceId might not be available. Therefore, this commit improves the function to wait until PhysicalResourceId is available Signed-off-by: Hanwen <hanwenli@amazon.com>
1 parent 2e6799c commit f6a9665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration-tests/tests/iam/test_iam_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _get_resources_with_image_resource(cfn_client, stack_name):
9393
image_resource_exists = False
9494
logging.info("Checking image resource")
9595
for resource in resources:
96-
if resource["ResourceType"] == "AWS::ImageBuilder::Image":
96+
if resource["ResourceType"] == "AWS::ImageBuilder::Image" and resource.get("PhysicalResourceId"):
9797
image_resource_exists = True
9898
logging.info("The image resource exists!")
9999
break

0 commit comments

Comments
 (0)