-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cfnspec): improve error meesaging when spec validation fails (#…
…16991) Print the node of the CFN spec where validation fails, so the erroneous part of the spec can be located. Currently, when a Property in a PropertyType has two "Type" fields specified, the message looks like below. Only the resource type being validated is printed. ``` FAIL test/filtered-specification.test.js (8.522 s) filteredSpecification("AWS::Synthetics::Canary") expect(received).toEqual(expected) - Expected - 1 + Received + 3 - Array [] + Array [ + "Type", + ] ``` With this change, the message will look like - ``` FAIL test/filtered-specification.test.js (8.522 s) filteredSpecification("AWS::Synthetics::Canary") › PropertyType AWS::Synthetics::Canary.ArtifactConfig › Property S3Encryption expect(received).toEqual(expected) - Expected - 1 + Received + 3 - Array [] + Array [ + "Type", + ] ``` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Niranjan Jayakar
authored
Oct 15, 2021
1 parent
55fbc86
commit fbb49fe
Showing
2 changed files
with
114 additions
and
105 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