-
Notifications
You must be signed in to change notification settings - Fork 398
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
ec2_vpc_nat_gateway: increase integration tests coverage #387
ec2_vpc_nat_gateway: increase integration tests coverage #387
Conversation
@alinabuzachis: Greetings! Thanks for taking the time to open this pullrequest. In order for the community to handle your pullrequest effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this pullrequest with this template: |
7705caf
to
3e00968
Compare
3e00968
to
f33eb01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see some form of tests against the shape of the data returned.
Where we search based on something like id, vpc or subnet we should probably check that we've been handed something that matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the tests you've added I see a few places we can add more assertions to the existing tests to help validate the module's behaviour.
Let's add an assertion to Search for internet gateway by VPC - no matches
(line 42 task) that igw_info.internet_gateways has a length of zero, to confirm there really are no matches
We should also assert the shape of the return in other places where we create a gateway, like for the task at line 116 (assertion at line 125). That's the first place we create a gw so that's our first chance to check the results that the module returns are accurate.
Anywhere that a NAT gateway is searched for, the assertion should check the ID that was returned is what was expected.
For example at the task at line 150, "Get NAT gateway with specific filters (state and subnet)", the assertion should ensure the correct gateway ID is in the result.
And after line 288, "Fetch NAT gateway by ID (list)".
52458ba
to
577972f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, anything you'd like to see @tremble?
Thanks for this work @alinabuzachis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a big improvement. Thanks for your work on this.
* Add additional integration tests for ec2_vpc_nat_gateway_info and ec2_vpc_nat_gatewy modules * Add ec2_vpc_nat_gateway_info in aliases * Fix NAT gateway search Signed-off-by: Alina Buzachis <[email protected]>
77f6629
to
0854c1c
Compare
…tests Signed-off-by: Alina Buzachis <[email protected]>
0854c1c
to
7274e3c
Compare
…lections#387) * NAT gateway: increase integration tests coverage * Add additional integration tests for ec2_vpc_nat_gateway_info and ec2_vpc_nat_gatewy modules * Add ec2_vpc_nat_gateway_info in aliases * Fix NAT gateway search Signed-off-by: Alina Buzachis <[email protected]>
…lections#387) * NAT gateway: increase integration tests coverage * Add additional integration tests for ec2_vpc_nat_gateway_info and ec2_vpc_nat_gatewy modules * Add ec2_vpc_nat_gateway_info in aliases * Fix NAT gateway search Signed-off-by: Alina Buzachis <[email protected]>
…lections#387) * NAT gateway: increase integration tests coverage * Add additional integration tests for ec2_vpc_nat_gateway_info and ec2_vpc_nat_gatewy modules * Add ec2_vpc_nat_gateway_info in aliases * Fix NAT gateway search Signed-off-by: Alina Buzachis <[email protected]>
…llections#387) s3_bucket - improve documentation of policy parameter SUMMARY This pull requests improves the documentation of the policy parameter in the s3_bucket module. It documents how to ensure the absence of a policy. Fixes ansible-collections#385 ISSUE TYPE Docs Pull Request COMPONENT NAME s3_bucket Reviewed-by: Jill R <None> Reviewed-by: Moritz Wagner <None> Reviewed-by: None <None> Reviewed-by: Mark Chappell <None>
…lections#387) * NAT gateway: increase integration tests coverage * Add additional integration tests for ec2_vpc_nat_gateway_info and ec2_vpc_nat_gatewy modules * Add ec2_vpc_nat_gateway_info in aliases * Fix NAT gateway search Signed-off-by: Alina Buzachis <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@fbfc351
SUMMARY
Increase integration test coverage for
ec2_vpc_nat_gateway
andec2_vpc_nat_gateway_info
COMPONENT NAME
ec2_vpc_nat_gateway
ec2_vpc_nat_gateway_info
ISSUE TYPE