]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat tests : bugfix FuncUtils check StackId not StackName
authorSteven Hardy <shardy@redhat.com>
Thu, 6 Sep 2012 10:41:15 +0000 (11:41 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 6 Sep 2012 10:48:15 +0000 (11:48 +0100)
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 <shardy@redhat.com>
heat/tests/functional/util.py

index fd2b82a36f8c1d55336dcab49dcb27dd3de1153e..5f978b72f160999f51e55d184684c84a9c987ca7 100644 (file)
@@ -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'