Commit Graph

75 Commits

Author SHA1 Message Date
Akira Noda
e3555bbe61
Adim: Add format check by ruff in Github Actions (#7510) 2024-03-22 20:04:01 -01:00
Akira Noda
90bdd72555
Admin: Using ruff format instead of black (#7502) 2024-03-21 19:17:29 -01:00
Macwan Nevil
005ead3332
updated default value for share status in route53resolver (#7496) 2024-03-20 07:26:54 -01:00
Akira Noda
a125b3cdce
Admin: Fix ruff warning (#7474) 2024-03-15 18:51:25 -01:00
Bert Blommers
8199a88446 Techdebt: Update scaffolding to use mock_aws (#7221) 2024-01-27 19:38:09 +00:00
Guilherme de Amorim
a04ef58386
SageMaker: correct describe_model_package_group does not exist msg (#7246) 2024-01-25 21:38:37 -01:00
Akira Noda
110234f67e
Introducing a new linter: ruff (#6752) 2023-09-03 06:16:24 +00:00
Bert Blommers
8aafbdb58f
Techdebt: Streamline AWSLambda/Docker tests (#6735) 2023-08-31 06:47:49 +00:00
Bert Blommers
2cf0130d13
Prep Release 4.1.7 (#6201) 2023-04-11 14:31:46 +00:00
Jordan Sanders
94d35af520
CloudFormation: Add coverage checklist (#6129)
This change introduces a checklist similar to IMPLEMENTATION_COVERAGE.md
to document moto's adherence to the full CloudFormation specification.

The script (invoked via `make cloudformation_coverage`) finds any moto
models that implement `moto.core.common_models.CloudFormationModel` and
checks to see if all CRUD methods are implemented. For `has_cfn_attr`,
it also checks to see if all of the attributes exposed by `Fn::GetAtt` are
implemented. It does not check to see if `physical_resource_id` is
implemented because as far as I can tell, the published AWS spec doesn't
include that information:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html

A more aggressive approach would be to remove default implementations
from all the abstract methods and allow Python to throw for any
unimplemented method. But that would obviously break a lot of things.

Instead, I think the checklist represents good documentation for users
about what they can and can't expect moto to handle when parsing their
CloudFormation templates. It also serves as a nice to-do list of small
improvements for contributors to add (and I'll likely add a few myself).
Many of these would be particularly good "first issues" for first time
contributors because in general, these methods just call existing
methods.
2023-03-27 17:56:19 +01:00
Hans Donner
18ec0c5467
Techdebt: skip tests when docker is not running (#6026) 2023-03-12 15:54:50 -01:00
Bert Blommers
f78ced59b3
Techdebt: Parallellize ACM/AMP tests (#5911) 2023-02-08 21:56:51 -01:00
Bert Blommers
79a0b9070b
Move to pyproject.toml, instead of setup.py (#5821) 2023-01-06 18:43:16 -01:00
Bert Blommers
ecafc89153
TechDebt - Unpin coverage-dependency to speed up Py3.11 (#5629) 2022-11-02 20:00:51 -01:00
Bert Blommers
56ca48cfdd
TechDebt: Enable MyPy on APIGateway-module (#5549) 2022-10-11 13:16:27 +00:00
Bert Blommers
d60aa64abb
TechDebt: Enable MyPy on AMP (#5546) 2022-10-10 13:05:56 +00:00
Bert Blommers
1a8f93dce3
TechDebt - MyPy the ACM module (#5540) 2022-10-07 14:41:31 +00:00
Bert Blommers
26412e1c3f
TechDebt: Introduce MyPy typing annotations (#5535) 2022-10-06 08:37:35 +00:00
Bobby Impollonia
c5586a1724
More portable grep invocation in Makefile (#5522)
LGTM - thanks for the fix @bobbyi!
2022-10-03 21:28:28 +00:00
Bert Blommers
bb540f6342
Techdebt: Parallelize more tests (#5464) 2022-09-15 12:27:07 +00:00
Iain Samuel McLean Elder
ba7c852b64
Refer to correct black version (#5038) 2022-04-19 22:18:28 +00:00
Bert Blommers
720bbe6433
Terraform Tests - update to latest TF branch (#5031) 2022-04-16 10:02:57 +00:00
Bert Blommers
eed32a5f72
Pylint - Enable more rules on source and tests-directory (#4929) 2022-03-11 20:28:45 -01:00
Bert Blommers
29d01c35bc
Update Black + formatting (#4926) 2022-03-10 13:39:59 -01:00
Bert Blommers
d118d592ca
Pylint remaining source code (#4760) 2022-01-14 18:51:49 -01:00
Bert Blommers
d2ca16cab5
Pylint on d*/e* directories (#4731) 2021-12-30 20:04:54 -01:00
Bert Blommers
c6815c1a4b
Pylint - run on source directories (abc only for now) (#4647) 2021-12-01 22:06:58 -01:00
Bert Blommers
8526013e61
Parallelize tests - Part 1 (#4368) 2021-10-05 17:11:07 +00:00
Bert Blommers
7acdfe4feb
Introduce Pylint to check for duplicate test method names (#3684) 2021-08-21 16:33: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
Bert Blommers
4ce936a284
CI - Run codecov on all tests, not just Py3.7 (#3654)
* CI - Run codecov on all tests, not just Py3.7

* Update build.yml

* Update build.yml
2021-02-02 18:01:00 +00:00
Brian Pandola
c9dd9cc7f9
Fix: IoT does not work in server mode (#3644)
Closes #1631
2021-02-01 13:15:57 +00:00
Bert Blommers
8591eda9d6
Introduce Github Actions to replace TravisCI (#3610) 2021-01-26 12:37:03 +00:00
Ciaran Evans
48df5bd5af
Add basic get_execution_history implementation for Step Functions (#3507)
* Add format command to makefile

* Refactor executions to be a attribute of StateMachine

* Begin to add tests for execution history

* Add tests for failed and successful event histories, with implementations

* Add failure case to environment var check

* Skip test if in server mode and update implementation coverage

* Add conditional import for mock to cover python 2

* Refactor stop execution logic into StateMachine

* Refactor event history environment variable into settings.py

* Remove typing and os import
2020-12-03 18:32:06 +00:00
Steve Pulec
72e616cb48 Add tagging to docker image build. 2020-11-28 17:10:38 -06:00
Matěj Cepl
ea489bce6c Finish porting from nose to pytest. 2020-11-10 08:25:05 +01:00
Bert Blommers
db1d7123f6 List dependencies for services - add integration test to verify 2020-09-13 16:08:23 +01:00
Toshiya Kawasaki
c66812edba
Add kinesisvideo archived media (#3280)
* add get_hls_streaming_session_url

* add get_dash_streaming_session_url

* add get_clip

* add test_server for kinesisvideo archived media

* fix for lint

* fix for lint

* avoid testing kinesisvideoarchivedmedia with TEST_SERVER_MODE=true
2020-09-04 12:14:48 +01:00
Steve Pulec
f27a55f13f Use Twine for publishing. 2019-11-14 15:10:54 -06:00
Asher Foa
c820395dbf Run black linter and enforce going forward 2019-10-31 08:46:14 -07:00
Steve Pulec
e77c4e3d09 Add getting setup to contributing. 2019-07-08 20:42:36 -05:00
martynaspaulikas
9418a6916d Fix tests and functionality of get_access_key_last_used() 2018-11-27 16:12:41 +00:00
Stephan Huber
99c98cbb4f update Makefile to work with changes made in implementation_coverage script 2018-06-01 12:30:42 +02:00
Jack Danger
402aa35459 fixing makefile 2018-01-20 19:35:02 -08:00
Jack Danger
101210e4d4
Merge pull request #1355 from JackDanger/jack/release-help
Updating CONTRIBUTING with release instructions
2017-12-27 11:07:01 -08:00
Jack Danger
bd037742ad Make releasing easier by making Makefile resilient 2017-12-22 09:15:59 -08:00
Jack Danger
172396e6a8 Updating CONTRIBUTING with release instructions 2017-11-20 13:17:24 -08:00
Toshiya Kawasaki
0de2e55b13 Support iot and iot-data (#1303)
* append appropriate urls when scaffolding

* make dispatch for rest-api

* fix dispatch for rest-json

* fix moto/core/response to obtain path and body parameters

* small fixes

* remove unused import

* fix get_int_param

* Add features of things and thing-types

* fix scaffold

* basic crud of cert

* support basic CRUD of policy

* refactor

* fix formatting of scaffold

* support principal_pocicy

* support thing_principal

* update readme

* escape service to handle service w/ hyphen like iot-data

* escape service w/ hyphen

* fix regexp to extract region from url

* escape service

* Implement basic iota-data feature

* iot-data shadow delta

* update readme

* remove unused import

* remove comment

* fix syntax

* specify region when creating boto3 client for test

* use uuid for seed of generating cert id

* specify region_name to iotdata client in test

* specify region to boto3 client in moto response

* excude iot and iotdata tests on server mode

* fix handling of thingTypeName in describe-thing

* test if server is up for iot
2017-11-10 09:44:02 +00:00
Jack Danger
3fc0326b55 updating implementation coverage on version release 2017-10-27 14:21:14 +02:00
Jack Danger
0ac36230e8 make task for generating implementation coverage output 2017-10-27 14:20:50 +02:00