The heat.tests.test_metadata_refresh Module

class heat.tests.test_metadata_refresh.MetadataRefreshTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

The point of the test is to confirm that metadata gets updated when FnGetAtt() returns something different. gets called.

create_stack(stack_name='test_stack', template='n{n "AWSTemplateFormatVersion" : "2010-09-09",n "Description" : "",n "Parameters" : {n "KeyName" : {"Type" : "String", "Default": "mine" },n },n "Resources" : {n "S1": {n "Type": "AWS::EC2::Instance",n "Metadata" : {n "AWS::CloudFormation::Init" : {n "config" : {n "files" : {n "/tmp/random_file" : {n "content" : { "Fn::Join" : ["", [n "s2-ip=", {"Fn::GetAtt": ["S2", "PublicIp"]}n ]]},n "mode" : "000400",n "owner" : "root",n "group" : "root"n }n }n }n }n },n "Properties": {n "ImageId" : "a",n "InstanceType" : "m1.large",n "KeyName" : { "Ref" : "KeyName" },n "UserData" : "#!/bin/bash -vn"n }n },n "S2": {n "Type": "AWS::EC2::Instance",n "Properties": {n "ImageId" : "a",n "InstanceType" : "m1.large",n "KeyName" : { "Ref" : "KeyName" },n "UserData" : "#!/bin/bash -vn"n }n }n }n}n', params={}, stub=True)[source]
setUp()[source]
speed = 'slow'
tag = ['unit', 'resource', 'Metadata']
tearDown()[source]
test_FnGetAtt(test_cls)[source]
class heat.tests.test_metadata_refresh.WaitCondMetadataUpdateTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

create_stack(stack_name='test_stack', template='n{n "AWSTemplateFormatVersion" : "2010-09-09",n "Description" : "",n "Parameters" : {n "KeyName" : {"Type" : "String", "Default": "mine" },n },n "Resources" : {n "S1": {n "Type": "AWS::EC2::Instance",n "Metadata" : {n "AWS::CloudFormation::Init" : {n "config" : {n "files" : {n "/tmp/random_file" : {n "content" : { "Fn::Join" : ["", [n "s2-ip=", {"Fn::GetAtt": ["S2", "PublicIp"]}n ]]},n "mode" : "000400",n "owner" : "root",n "group" : "root"n }n }n }n }n },n "Properties": {n "ImageId" : "a",n "InstanceType" : "m1.large",n "KeyName" : { "Ref" : "KeyName" },n "UserData" : "#!/bin/bash -vn"n }n },n "S2": {n "Type": "AWS::EC2::Instance",n "Properties": {n "ImageId" : "a",n "InstanceType" : "m1.large",n "KeyName" : { "Ref" : "KeyName" },n "UserData" : "#!/bin/bash -vn"n }n }n }n}n')[source]
setUp()[source]
speed = 'slow'
tag = ['unit', 'resource', 'Metadata']
tearDown()[source]
test_wait_meta(test_cls)[source]

This Page