Commit Graph

73 Commits

Author SHA1 Message Date
Bert Blommers
8aafbdb58f
Techdebt: Streamline AWSLambda/Docker tests (#6735) 2023-08-31 06:47:49 +00:00
Bert Blommers
689c93376a
Techdebt: Replace sure with regular assertions in Events (#6564) 2023-07-27 09:39:24 +00:00
Bert Blommers
2b9c98895c
Events: Separate Rules by the EventBus they're assigned to (#6091) 2023-03-20 13:47:22 -01:00
Hans Donner
18ec0c5467
Techdebt: skip tests when docker is not running (#6026) 2023-03-12 15:54:50 -01:00
Bert Blommers
b0ee64f24a
Events: Support CrossAccount events (#5866) 2023-01-23 09:49:56 -01:00
Daniel Roschka
0588db704a
Remove dependency on pytz (#5749) 2022-12-09 22:56:08 -01:00
Bert Blommers
1a8ddc0f2b
Techdebt: Replace string-format with f-strings (for tests dirs) (#5678) 2022-11-17 21:41:08 -01:00
Bert Blommers
68cf3e8a1d
Events: delete_rule() with unknown name should fail silently (#5665) 2022-11-17 16:36:10 -01:00
Bert Blommers
3d913f8f15
MultiAccount support (#5192) 2022-08-13 09:49:43 +00:00
Bert Blommers
5a34a6599d
Events - send events to (subset of) targets (#5169) 2022-05-25 23:03:39 +00:00
Brian Pandola
30c2aeab29
Fix Exists pattern matching with None values (#5134)
Exists matching works on the presence or absence of a field in the JSON of the event.
The value of the field is not considered when evaluating a match.[1]

* Add sentinel to distinguish between missing fields and existing fields with None values
* Update event pattern matching tests to cover this specific use-case.
* Add integrated test to cover this scenario within a larger context.

[1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns-content-based-filtering.html
2022-05-13 15:06:48 -07:00
rangerthegood
a20633b577
events: delete_rule implementation update (#5056) 2022-04-24 10:03:28 +00:00
Bert Blommers
10bd677cf2
Admin - enable more Pylint rules (#5037) 2022-04-18 20:44:56 +00:00
Bert Blommers
29d01c35bc
Update Black + formatting (#4926) 2022-03-10 13:39:59 -01:00
Bert Blommers
16685d3407
CloudwatchLogs - implement validation for old/new messages (#4565) 2021-11-12 16:22:47 -01:00
Bert Blommers
3353677c72
Events - match full list against pattern (#4534) 2021-11-06 12:21:40 -01:00
Bert Blommers
14a69c7524
Techdebt: Enable pylint rules (#4432) 2021-10-18 19:44:29 +00:00
Bert Blommers
d9830c0766
Events: Fix pagination for list_rules/list_rule_names_by_target (#3781) 2021-10-11 19:16:34 +00:00
Timothy Klopotoski
acf34a685f
Delete event rule when deleted from cloudformation template (#4382) 2021-10-09 10:11:46 +00:00
Timothy Klopotoski
b4f02f3436
Translate Cloudformation API data to EventBridge API data (#4188) 2021-08-18 20:31:29 +01:00
Bert Blommers
547a1844ed
Tech debt - improve test coverage EC2/ELBv2/Events (#4181) 2021-08-16 15:13:50 +01:00
Gonzalo Saad
9e61ab2220
refactor(events): Improve put_rule and event pattern (#4158) 2021-08-13 06:01:44 +01:00
Anton Grübel
a5eb46962d
Fix events target for custom event bus (#4168) 2021-08-12 06:02:16 +01:00
Bert Blommers
a1905ad584
Improve test coverage (#4098) 2021-07-28 11:17:15 +01:00
Waldemar Hummer
f4f8527955
Merge LocalStack changes into upstream moto (#4082)
* fix OPTIONS requests on non-existing API GW integrations

* add cloudformation models for API Gateway deployments

* bump version

* add backdoor to return CloudWatch metrics

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* bump version

* minor fixes

* fix Number data_type for SQS message attribute

* fix handling of encoding errors

* bump version

* make CF stack queryable before starting to initialize its resources

* bump version

* fix integration_method for API GW method integrations

* fix undefined status in CF FakeStack

* Fix apigateway issues with terraform v0.12.21
* resource_methods -> add handle for "DELETE" method
* integrations -> fix issue that "httpMethod" wasn't included in body request (this value was set as the value from refer method resource)

* bump version

* Fix setting http method for API gateway integrations (#6)

* bump version

* remove duplicate methods

* add storage class to S3 Key when completing multipart upload (#7)

* fix SQS performance issues; bump version

* add pagination to SecretsManager list-secrets (#9)

* fix default parameter groups in RDS

* fix adding S3 metadata headers with names containing dots (#13)

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* make CF stack queryable before starting to initialize its resources

* bump version

* remove duplicate methods

* fix adding S3 metadata headers with names containing dots (#13)

* Update amis.json to support EKS AMI mocks (#15)

* fix PascalCase for boolean value in ListMultipartUploads response (#17); fix _get_multi_param to parse nested list/dict query params

* determine non-zero container exit code in Batch API

* support filtering by dimensions in CW get_metric_statistics

* fix storing attributes for ELBv2 Route entities; API GW refactorings for TF tests

* add missing fields for API GW resources

* fix error messages for Route53 (TF-compat)

* various fixes for IAM resources (tf-compat)

* minor fixes for API GW models (tf-compat)

* minor fixes for API GW responses (tf-compat)

* add s3 exception for bucket notification filter rule validation

* change the way RESTErrors generate the response body and content-type header

* fix lint errors and disable "black" syntax enforcement

* remove return type hint in RESTError.get_body

* add RESTError XML template for IAM exceptions

* add support for API GW minimumCompressionSize

* fix casing getting PrivateDnsEnabled API GW attribute

* minor fixes for error responses

* fix escaping special chars for IAM role descriptions (tf-compat)

* minor fixes and tagging support for API GW and ELB v2 (tf-compat)

* Merge branch 'master' into localstack

* add "AlarmRule" attribute to enable support for composite CloudWatch metrics

* fix recursive parsing of complex/nested query params

* bump version

* add API to delete S3 website configurations (#18)

* use dict copy to allow parallelism and avoid concurrent modification exceptions in S3

* fix precondition check for etags in S3 (#19)

* minor fix for user filtering in Cognito

* fix API Gateway error response; avoid returning empty response templates (tf-compat)

* support tags and tracingEnabled attribute for API GW stages

* fix boolean value in S3 encryption response (#20)

* fix connection arn structure

* fix api destination arn structure

* black format

* release 2.0.3.37

* fix s3 exception tests

see botocore/parsers.py:1002 where RequestId is removed from parsed

* remove python 2 from build action

* add test failure annotations in build action

* fix events test arn comparisons

* fix s3 encryption response test

* return default value "0" if EC2 availableIpAddressCount is empty

* fix extracting SecurityGroupIds for EC2 VPC endpoints

* support deleting/updating API Gateway DomainNames

* fix(events): Return empty string instead of null when no pattern is specified in EventPattern (tf-compat) (#22)

* fix logic and revert CF changes to get tests running again (#21)

* add support for EC2 customer gateway API (#25)

* add support for EC2 Transit Gateway APIs (#24)

* feat(logs): add `kmsKeyId` into `LogGroup` entity (#23)

* minor change in ELBv2 logic to fix tests

* feat(events): add APIs to describe and delete CloudWatch Events connections (#26)

* add support for EC2 transit gateway route tables (#27)

* pass transit gateway route table ID in Describe API, minor refactoring (#29)

* add support for EC2 Transit Gateway Routes (#28)

* fix region on ACM certificate import (#31)

* add support for EC2 transit gateway attachments (#30)

* add support for EC2 Transit Gateway VPN attachments (#32)

* fix account ID for logs API

* add support for DeleteOrganization API

* feat(events): store raw filter representation for CloudWatch events patterns (tf-compat) (#36)

* feat(events): add support to describe/update/delete CloudWatch API destinations (#35)

* add Cognito UpdateIdentityPool, CW Logs PutResourcePolicy

* feat(events): add support for tags in EventBus API (#38)

* fix parameter validation for Batch compute environments (tf-compat)

* revert merge conflicts in IMPLEMENTATION_COVERAGE.md

* format code using black

* restore original README; re-enable and fix CloudFormation tests

* restore tests and old logic for CF stack parameters from SSM

* parameterize RequestId/RequestID in response messages and revert related test changes

* undo LocalStack-specific adaptations

* minor fix

* Update CodeCov config to reflect removal of Py2

* undo change related to CW metric filtering; add additional test for CW metric statistics with dimensions

* Terraform - Extend whitelist of running tests

Co-authored-by: acsbendi <acsbendi28@gmail.com>
Co-authored-by: Phan Duong <duongpv@outlook.com>
Co-authored-by: Thomas Rausch <thomas@thrau.at>
Co-authored-by: Macwan Nevil <macnev2013@gmail.com>
Co-authored-by: Dominik Schubert <dominik.schubert91@gmail.com>
Co-authored-by: Gonzalo Saad <saad.gonzalo.ale@gmail.com>
Co-authored-by: Mohit Alonja <monty16597@users.noreply.github.com>
Co-authored-by: Miguel Gagliardo <migag9@gmail.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-07-26 15:21:17 +01:00
usmangani1
d325593e46
Fix:Add list connection API's (#3976)
* Initial commit create connection

* Added connection API's

* Add destination API's

* fixed tests

* fix tests

* Fixed tests
2021-06-07 10:35:28 +01:00
Tom Noble
3942613bf4
Enhancement/3837 (#3847)
* Move event pattern validation into EventPattern class and apply enhanced pattern logic to all Rules

* Fix exists filtering logic to only match leaf nodes in event

* Apply black formatting

* Replace JSONDecodeError with ValueError for Python2 compatibility

* Update unit test names

* Move event pattern tests into test_event_pattern.py

* Apply black formatting

Co-authored-by: TSNoble <tom.noble@bjss.com>
2021-04-10 14:27:38 +01:00
Tom Noble
b138d9956b
Add prefix and numeric filtering logic for Archive EventPattern (#3835)
* Add prefix and numeric filtering logic for Archive EventPattern

* Pull EventPattern logic out into class and test logic more directly

* Apply black formatting

Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-04-04 19:27:54 +01:00
Tom Noble
15eda737d6
Add exists filtering functionality to Archive (#3832)
* Add exists filtering functionality to Archive. Add test case and refactor existing Archive EventPattern test cases

* Apply black formatting

* Change NotImplementedError to warning

* Simplify unimplemented warning for filters

* Change str check to six.string_types check for python2.7

Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-04-02 18:32:01 +01:00
Anton Grübel
e90858b2e8
Add events target integration for sqs fifo queue (#3830)
* Add events target integration for sqs fifo queue

* Rename test file
2021-04-02 14:29:05 +01:00
Tom Noble
1440709e4c
Enhancement/3821 (#3822)
* Add _does_event_match_pattern() to EventsBackend and use when determining whether to archive an event

* Add comment to _does_event_item_match_pattern_item()

* Expand test case for Archive EventFilter

* Apply black formatting

Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-04-01 10:31:10 +01:00
Anton Grübel
9c89c24caf
Add events target integration for sqs queue (#3815) 2021-03-30 14:13:10 +01:00
Anton Grübel
9a020e6120
Fix events rule ARN for custom event bus (#3809)
* Fix events rule ARN for custom event bus

* Fix cloudformation test
2021-03-28 19:41:24 +01:00
Tom Noble
57aa83e6c1
Use MOCK_ACCOUNT_ID when building default Rule ARN (#3808)
Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-03-28 16:20:21 +01:00
Tom Noble
f549f1d087
Modify Rule.send_to_targets() to handle event_bus_name as ARN (#3804)
* Modify Rule.send_to_targets() to handle event_bus_name as ARN

* Apply black formatting

Co-authored-by: Tom Noble <tom.noble@bjss.com>
2021-03-28 11:33:47 +01:00
usmangani1
5c04a4d8cc
Fix:update rule (#3734)
* Fix:SQS-message retention period consideration

* Fix:SQS-message retention period consideration

* Fix:SQS-message retention period consideration

* Added comments &linting

* Fixed tests

* Fix:update rule

* Linting and comments
2021-03-02 09:01:09 +00:00
Anton Grübel
3c810ad152
Add eventbridge replay (#3735)
* Add events.start_replay

* Add events.describe_replay

* Add events.list_replays

* Add events.cancel_replay

* implement actual replay functionality

* Fix Python 2.7 issues
2021-03-01 13:20:36 +00:00
Emilio López
5fd20626b3
events: fix archive event pattern match check (#3671)
* events: fix archive event pattern match check

There is a missing `return True` for the positive match case in
matches_pattern, causing all valid patterns to fail.

* events: add test for valid, non-empty pattern match
2021-02-16 08:54:28 +00:00
Anton Grübel
199da2220b
Add EventBridge Archive CRUD endpoints (#3617)
* Add events.create_archive

* Add events.describe_archive

* Add events.list_archives

* Add events.update_archive

* Add events.delete_archive

* Add actual archive functionality

* Fix test

* Fix PR issues
2021-01-28 10:47:53 +00:00
Anton Grübel
17d94f9e09
Add validation to put_events (#3579)
* Add validation to put_events

* Add extra test for put_events

* Fix Python 2.7 error
2021-01-11 09:41:31 +00:00
Guillermo Arribas
62fd975da0
EventBridge: put_rule and list_rules should store and retrieve EventBusName property (#3472)
Co-authored-by: Guillermo Arribas <garribas@atlassian.com>
2020-11-17 15:36:17 +00:00
Matěj Cepl
77dc60ea97 Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of
failures is left to the next commit.
2020-11-10 08:23:44 +01:00
Giovanni Torres
195ba81c56
feat: update events remove_targets API response (#3340)
* feat: update events remove_targets API response

* test: add missing test for expected exception
2020-09-29 11:51:17 +01:00
Logan Jones
6fb7867767
Fix: Put Events API (#3145)
* Fix: Put Events API

* Update from code review.

Co-authored-by: Logan Asher Jones <logan@codescratch.com>
2020-07-19 10:00:24 +01:00
Victor Le Fichant
cb600377b4
Fix incorrect response for put-targets action (#3037) 2020-06-02 16:31:42 +01:00
Guilherme Martins Crocetti
c25f6a72da refactor put_rule test 2020-04-01 22:14:51 -03:00
Guilherme Martins Crocetti
a1f664d2bb Change put_rule (and it's response) and fix tests_events/ 2020-03-22 17:33:44 -03:00
Bryan Alexander
38413577fc fixes bug in resourcetaggingapi/get_kms_tags 2020-02-19 09:18:01 -06:00
Bryan Alexander
445f474534 merging from master 2020-02-18 10:47:05 -06:00
Brady
ecdedf30c8 force build... 2020-02-05 16:31:33 -05:00