Skip to content

Commit

Permalink
Minor linting fixups - 2022-08-12 (ansible-collections#1408)
Browse files Browse the repository at this point in the history
Minor linting fixups - 2022-08-12

SUMMARY
Various linting and unit test fixups

unused variables
overly broad Exception catching (highlighted some broken tests)
removes direct use of unittest in favour of pytest (see also ansible-collections#961)
cleans up skipping of tests when botocore/boto3 aren't installed
passes error message from VPNConnectionException into its super to make testing easier, should never be directly exposed to the user

Removes tests for 3 modules which now have integration tests, they're either recording based (fragile)or test things which are separately tested in the integration tests.

lambda
s3_bucket_notifications
route53_zone

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/ec2_vpc_vpn.py
tests/unit
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored Aug 17, 2022
1 parent 324738d commit 68f4f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ec2_vpc_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@

class VPNConnectionException(Exception):
def __init__(self, msg, exception=None):
super(VPNConnectionException, self).__init__(msg)
self.msg = msg
self.exception = exception

Expand Down
2 changes: 1 addition & 1 deletion lambda_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
enabled:
description:
- Indicates whether AWS Lambda should begin polling or readin from the event source.
default: true.
default: true
type: bool
batch_size:
description:
Expand Down

0 comments on commit 68f4f01

Please sign in to comment.