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

fix(tests): patch head_bucket function correctly #5246

Conversation

sergargar
Copy link
Member

Context

Tests for the check cloudfront_distributions_s3_origin_non_existent_bucket were failing because of mocking the head_bucket function incorrectly.

Description

By specifically patching s3_client._head_bucket within the context of each test, we're ensuring that it returns the correct values.

Checklist

License

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

@sergargar sergargar requested review from a team as code owners September 30, 2024 14:12
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Sep 30, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.14%. Comparing base (3db541a) to head (9c86f34).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5246   +/-   ##
=======================================
  Coverage   89.13%   89.14%           
=======================================
  Files         988      989    +1     
  Lines       30374    30397   +23     
=======================================
+ Hits        27075    27097   +22     
- Misses       3299     3300    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@puchy22 puchy22 left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@sergargar sergargar merged commit da87c0d into master Sep 30, 2024
11 checks passed
@sergargar sergargar deleted the PRWLR-4946-fix-tests-in-cloudfront-distributions-s-3-origin-non-existent-bucket-test branch September 30, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants