]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Tests for s3 and swift resources were extended
authorMaksym Iarmak <miarmak@mirantis.com>
Wed, 14 Aug 2013 15:20:12 +0000 (18:20 +0300)
committerMaksym Iarmak <miarmak@mirantis.com>
Wed, 14 Aug 2013 15:23:12 +0000 (18:23 +0300)
According to the description of the bug, the problem
is in the mechanism of dependencies. That is an internal
function Ref is not working properly. To repeat it, check
was added to the test templates (s3_test, swift_test). Thus,
the bug has not been reproduced.

Also, the method FnGetRefId in s3 and swift resources,
despite its name, returns the resource name in the format
'stack_name-resource_name-resource_id'. This is achieved
by the method physical_resource_name, that implemented in
superclass resource.Resource.

Bug 1202987

Change-Id: I0f85c39e10e8b455f93fdd768cd5e6ee14497277

heat/tests/test_s3.py
heat/tests/test_swift.py

index 534de57d5d463474668fb9999a8e25860843a7d7..f9abb2414e9bcb620e1bca11505a261e5bc86954 100644 (file)
@@ -44,6 +44,12 @@ swift_template = '''
          }
       }
     },
+    "SwiftContainer": {
+         "Type": "OS::Swift::Container",
+         "Properties": {
+            "S3Bucket": {"Ref" : "S3Bucket"},
+         }
+      },
     "S3Bucket" : {
       "Type" : "AWS::S3::Bucket",
       "Properties" : {
index aa5ee4cf4188d615de053ff355e8fa07650c9c37..7f38ef9279418689042170ca5822c0998af550ec 100644 (file)
@@ -45,6 +45,12 @@ swift_template = '''
          }
       }
     },
+    "S3Bucket" : {
+      "Type" : "AWS::S3::Bucket",
+      "Properties" : {
+        "SwiftContainer" : {"Ref" : "SwiftContainer"}
+      }
+    },
     "SwiftContainer" : {
       "Type" : "OS::Swift::Container",
       "Properties" : {