-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for AZ schema changes (#3655)
- Loading branch information
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[ | ||
{ | ||
"Filename": "test/fixtures/templates/integration/availability-zones.yaml", | ||
"Id": "5ed67959-64ec-2c99-379b-b9c9cc0afea2", | ||
"Level": "Error", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 25, | ||
"LineNumber": 5 | ||
}, | ||
"Path": [ | ||
"Resources", | ||
"Subnet", | ||
"Properties", | ||
"AvailabilityZoneId" | ||
], | ||
"Start": { | ||
"ColumnNumber": 7, | ||
"LineNumber": 5 | ||
} | ||
}, | ||
"Message": "'AvailabilityZoneId' should not be included with 'AvailabilityZone'", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "When certain properties are specified other properties should not be included", | ||
"Id": "E3020", | ||
"ShortDescription": "Validate that when a property is specified another property should be excluded", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentexcluded" | ||
} | ||
}, | ||
{ | ||
"Filename": "test/fixtures/templates/integration/availability-zones.yaml", | ||
"Id": "de15b593-58fc-a138-446a-c62c4803d10e", | ||
"Level": "Error", | ||
"Location": { | ||
"End": { | ||
"ColumnNumber": 23, | ||
"LineNumber": 6 | ||
}, | ||
"Path": [ | ||
"Resources", | ||
"Subnet", | ||
"Properties", | ||
"AvailabilityZone" | ||
], | ||
"Start": { | ||
"ColumnNumber": 7, | ||
"LineNumber": 6 | ||
} | ||
}, | ||
"Message": "'AvailabilityZone' should not be included with 'AvailabilityZoneId'", | ||
"ParentId": null, | ||
"Rule": { | ||
"Description": "When certain properties are specified other properties should not be included", | ||
"Id": "E3020", | ||
"ShortDescription": "Validate that when a property is specified another property should be excluded", | ||
"Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#dependentexcluded" | ||
} | ||
} | ||
] |
12 changes: 12 additions & 0 deletions
12
test/fixtures/templates/integration/availability-zones.yaml
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Resources: | ||
Subnet: | ||
Properties: | ||
AvailabilityZoneId: use1-az1 | ||
AvailabilityZone: | ||
Fn::Select: | ||
- 0 | ||
- Fn::GetAZs: "" | ||
CidrBlock: 10.0.0.0/20 | ||
VpcId: vpc-abc12345 | ||
Type: "AWS::EC2::Subnet" |
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