From bfddf669cc70958bbe2b4d1b5495151ac116e5e9 Mon Sep 17 00:00:00 2001 From: Maksym Iarmak Date: Wed, 14 Aug 2013 18:20:12 +0300 Subject: [PATCH] Tests for s3 and swift resources were extended 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 | 6 ++++++ heat/tests/test_swift.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/heat/tests/test_s3.py b/heat/tests/test_s3.py index 534de57d..f9abb241 100644 --- a/heat/tests/test_s3.py +++ b/heat/tests/test_s3.py @@ -44,6 +44,12 @@ swift_template = ''' } } }, + "SwiftContainer": { + "Type": "OS::Swift::Container", + "Properties": { + "S3Bucket": {"Ref" : "S3Bucket"}, + } + }, "S3Bucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { diff --git a/heat/tests/test_swift.py b/heat/tests/test_swift.py index aa5ee4cf..7f38ef92 100644 --- a/heat/tests/test_swift.py +++ b/heat/tests/test_swift.py @@ -45,6 +45,12 @@ swift_template = ''' } } }, + "S3Bucket" : { + "Type" : "AWS::S3::Bucket", + "Properties" : { + "SwiftContainer" : {"Ref" : "SwiftContainer"} + } + }, "SwiftContainer" : { "Type" : "OS::Swift::Container", "Properties" : { -- 2.45.2