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

chore: Add region skip condition and retry for http test #2455

Merged
merged 2 commits into from Jul 25, 2022

Conversation

qingchm
Copy link
Contributor

@qingchm qingchm commented Jul 25, 2022

Issue #, if available:
N.A.

Description of changes:
To exclude regions for http tests so it does not get tested in regions not supporting http api

Description of how you validated changes:
This change uses the same decorator used in other http api tests

Checklist:

  • Add/update unit tests using:
  • Add/update integration tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected
  • Do these changes include any template validations?
    • Did the newly validated properties support intrinsics prior to adding the validations? (If unsure, please review Intrinsic Functions before proceeding).
      • Does the pull request ensure that intrinsics remain functional with the new validations?

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.

class TestFunctionWithHttpApiAndAuth(BaseTest):
"""
AWS::Lambda::Function tests with http api events and auth
"""

@retry(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be issues surrounding the fact that the stacks were not cleaned up correctly, is that a possibility here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope for each stack the stack name is generated with a unique hash, random.choice(string.ascii_lowercase) for i in range(RANDOM_SUFFIX_LENGTH), so a failed clean up will never affect stack creation

@qingchm qingchm requested a review from sriram-mv July 25, 2022 17:38
@qingchm qingchm merged commit 90b55e5 into aws:develop Jul 25, 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.

None yet

3 participants