Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Schema validation for SimpleTable #2195

Closed
wants to merge 2 commits into from

Conversation

mgrandis
Copy link
Contributor

Issue #, if available: N/A

Description of changes:
Added schema validation for the AWS::Serverless::SimpleTable resource.

Description of how you validated changes:
Unit tests with yaml files + ran the validation over the Translator test files.

One file returned a validation error and was updated:
tests/translator/input/simple_table_with_extra_tags.yaml

Indeed, according to the CFN doc, a tag value must be at least 1 character long, this test file had a tag value with an empty string.

Checklist:

  • Add/update tests using:
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #2195 (1415d91) into develop (e7a1496) will increase coverage by 0.80%.
The diff coverage is 98.27%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2195      +/-   ##
===========================================
+ Coverage    93.58%   94.39%   +0.80%     
===========================================
  Files           90       95       +5     
  Lines         6124     6542     +418     
  Branches      1260     1319      +59     
===========================================
+ Hits          5731     6175     +444     
+ Misses         183      170      -13     
+ Partials       210      197      -13     
Impacted Files Coverage Δ
samtranslator/model/lambda_.py 93.10% <ø> (ø)
samtranslator/plugins/globals/globals.py 99.05% <ø> (ø)
samtranslator/translator/logical_id_generator.py 100.00% <ø> (+9.09%) ⬆️
samtranslator/region_configuration.py 77.77% <63.63%> (-22.23%) ⬇️
samtranslator/translator/translator.py 97.26% <90.00%> (+0.07%) ⬆️
samtranslator/swagger/swagger.py 94.00% <92.50%> (+0.63%) ⬆️
samtranslator/__init__.py 100.00% <100.00%> (ø)
samtranslator/feature_toggle/dialup.py 100.00% <100.00%> (ø)
samtranslator/feature_toggle/feature_toggle.py 100.00% <100.00%> (+12.16%) ⬆️
samtranslator/metrics/method_decorator.py 100.00% <100.00%> (ø)
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f3a03f...1415d91. Read the comment docs.

@jfuss jfuss mentioned this pull request Mar 1, 2022
@jfuss jfuss closed this Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants