forked from awslabs/goformation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): Fixed tests that relied on required properties
We had some tests that relied on the fact that AWS::Route53::HostedZone had a required property of 'Name'. This recently changed and the Name property is no longer marked as required in the CFN schema, so tests failed. Searched for resources that had a single required property and picked one at random (AWS::IoT::Policy). Tests passing now.
- Loading branch information
1 parent
36cc848
commit 056535a
Showing
2 changed files
with
29 additions
and
30 deletions.
There are no files selected for viewing
31 changes: 15 additions & 16 deletions
31
test/json/invalid-template-empty-resource-properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
{ | ||
"AWSTemplateFormatVersion" : "2010-09-09", | ||
"Description" : "Has empty properties for AWS::Route53::HostedZone (Name is required)", | ||
"Resources" : { | ||
"MyRoute53HostedZone" : { | ||
"Type" : "AWS::Route53::HostedZone", | ||
"Properties" : { | ||
} | ||
"AWSTemplateFormatVersion": "2010-09-09", | ||
"Description": "Has empty properties for AWS::IoT::Policy (PolicyDocument is required)", | ||
"Resources": { | ||
"MyRoute53HostedZone": { | ||
"Type": "AWS::IoT::Policy", | ||
"Properties": {} | ||
}, | ||
"MySNSTopic" : { | ||
"Type" : "AWS::SNS::Topic", | ||
"Properties" : { | ||
"DisplayName" : "test-sns-topic-display-name", | ||
"Subscription" : [ | ||
"MySNSTopic": { | ||
"Type": "AWS::SNS::Topic", | ||
"Properties": { | ||
"DisplayName": "test-sns-topic-display-name", | ||
"Subscription": [ | ||
{ | ||
"Endpoint" : "test-sns-topic-subscription-endpoint", | ||
"Protocol" : "test-sns-topic-subscription-protocol" | ||
"Endpoint": "test-sns-topic-subscription-endpoint", | ||
"Protocol": "test-sns-topic-subscription-protocol" | ||
} | ||
], | ||
"TopicName" : "test-sns-topic-name" | ||
"TopicName": "test-sns-topic-name" | ||
} | ||
} | ||
} | ||
} | ||
} |
28 changes: 14 additions & 14 deletions
28
test/json/invalid-template-missing-resource-properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{ | ||
"AWSTemplateFormatVersion" : "2010-09-09", | ||
"Description" : "Missing Properties for AWS::Route53::HostedZone (Name is required)", | ||
"Resources" : { | ||
"MyRoute53HostedZone" : { | ||
"Type" : "AWS::Route53::HostedZone" | ||
"AWSTemplateFormatVersion": "2010-09-09", | ||
"Description": "Missing Properties for AWS::IoT::Policy (PolicyDocument is required)", | ||
"Resources": { | ||
"MyIoTPolicy": { | ||
"Type": "AWS::IoT::Policy" | ||
}, | ||
"MySNSTopic" : { | ||
"Type" : "AWS::SNS::Topic", | ||
"Properties" : { | ||
"DisplayName" : "test-sns-topic-display-name", | ||
"Subscription" : [ | ||
"MySNSTopic": { | ||
"Type": "AWS::SNS::Topic", | ||
"Properties": { | ||
"DisplayName": "test-sns-topic-display-name", | ||
"Subscription": [ | ||
{ | ||
"Endpoint" : "test-sns-topic-subscription-endpoint", | ||
"Protocol" : "test-sns-topic-subscription-protocol" | ||
"Endpoint": "test-sns-topic-subscription-endpoint", | ||
"Protocol": "test-sns-topic-subscription-protocol" | ||
} | ||
], | ||
"TopicName" : "test-sns-topic-name" | ||
"TopicName": "test-sns-topic-name" | ||
} | ||
} | ||
} | ||
} | ||
} |