aws-cloudformation / cloudformation-resource-schema

The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
Apache License 2.0
93 stars 38 forks source link

Simplify validator tests #50

Closed tobywf closed 4 years ago

tobywf commented 4 years ago

Issue #, if available: N/A

Description of changes: Struggled to debug the ValidatorTests when adding an unrelated change. We duplicate code to construct a basic schema and then manipulate that. This simply refactors it out into the baseSchema method, and makes grokking the tests much quicker. Sending as a separate PR.

Additionally, I've parameterized the tests for required keys missing, and found a slightly more sane way to construct long URLs.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.