From 809ad01ec7a9e0084e84f541090eb4449186509a Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 6 Sep 2012 11:41:15 +0100 Subject: [PATCH] heat tests : bugfix FuncUtils check StackId not StackName CreateStack response no longer contains StackName, so we need to parse the StackId and extract the name from the new ARN format Change-Id: If55ff286c98e8396a14fa4ee2b08622faa680a03 Signed-off-by: Steven Hardy --- heat/tests/functional/util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/heat/tests/functional/util.py b/heat/tests/functional/util.py index fd2b82a36f..5f978b72f1 100644 --- a/heat/tests/functional/util.py +++ b/heat/tests/functional/util.py @@ -169,11 +169,16 @@ class FuncUtils: # Check result looks OK root = etree.fromstring(result) - create_list = root.xpath('/CreateStackResponse/CreateStackResult' + - '[StackName="' + self.stackname + '"]') + create_list = root.xpath('/CreateStackResponse/CreateStackResult') assert create_list assert len(create_list) == 1 + # Extract StackId from the result, and check the StackName part + stackid = create_list[0].findtext('StackId') + idname = stackid.split('/')[1] + print "Checking %s contains name %s" % (stackid, self.stackname) + assert idname == self.stackname + alist = None tries = 0 print 'Waiting for stack creation to be completed'