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(ec2_securitygroup_not_used): Mock Lambda service #2947

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

jfagoagas
Copy link
Member

@jfagoagas jfagoagas commented Oct 19, 2023

Description

The check ec2_securitygroup_not_used now uses a Lambda service client (#2944) so we need to mock that service client in the check's tests.

I fixed all the Lambda mocks using the same way with the check awslambda_client and created a utils lib with some code that is always present in the tests.

License

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

@jfagoagas jfagoagas added the provider/aws Issues/PRs related with the AWS provider label Oct 19, 2023
@jfagoagas jfagoagas self-assigned this Oct 19, 2023
@jfagoagas jfagoagas requested a review from a team October 19, 2023 13:08
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #2947 (b192d33) into master (54fe10a) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2947      +/-   ##
==========================================
- Coverage   86.26%   86.25%   -0.01%     
==========================================
  Files         551      551              
  Lines       17652    17658       +6     
==========================================
+ Hits        15227    15231       +4     
- Misses       2425     2427       +2     
Files Coverage Δ
...viders/aws/services/awslambda/awslambda_service.py 86.95% <100.00%> (+0.11%) ⬆️
...curitygroup_not_used/ec2_securitygroup_not_used.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

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

machine 🤖

@MrCloudSec MrCloudSec merged commit 1702416 into master Oct 19, 2023
@MrCloudSec MrCloudSec deleted the fix-ec2_securitygroup_not_used-test branch October 19, 2023 15:05
jfagoagas added a commit to jit-contrib/prowler that referenced this pull request Oct 19, 2023
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