Repository navigation
test: Use valid enum values in graphqlapi_api_cache test - #4001
Merged
Merged
Conversation
The latest CloudFormation schema pulled by cfn-lint now restricts AWS::AppSync::ApiCache ApiCachingBehavior and Type to enum values, so the placeholder values "somebehaviour" and "mytype" fail bin/run_cfn_lint.sh (E3030) on every PR. SAM passes both properties through unchanged, so the test only needs some value to verify the passthrough. Replace the placeholders with valid values (FULL_REQUEST_CACHING, SMALL).
reedham-aws
approved these changes
Oct 1, 2026
vicheey
approved these changes
Oct 1, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available
N/A
Description of changes
bin/run_cfn_lint.shrunscfn-lint -ubefore linting, which pulls the latest CloudFormation schema. That schema now restrictsAWS::AppSync::ApiCacheApiCachingBehaviorandTypeto enum values, so the placeholder values in thegraphqlapi_api_cachetest fail lint withE3030on every PR, regardless of what the PR changes:(plus the same two errors in the
aws-cnandaws-us-govoutputs).SAM passes both properties through unchanged (
passthrough_valueinsam_resources.py,PassThroughPropin the schema source), so the test only needs some value to verify the passthrough. This replaces the placeholders with valid values (FULL_REQUEST_CACHING,SMALL) in the input and the three partition outputs. Nosamtranslatorcode changes.Description of how you validated changes
pytest tests/translator/test_translator.py -k graphqlapi_api_cache: 3 passed (all partitions).bin/run_cfn_lint.sh(cfn-lint 1.55.0, schema updated in the run): exit 0, no errors. Before this change it reported the 6E3030errors above.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.