Prep release 3.0.4 (#4871)

This commit is contained in:
Bert Blommers 2022-02-18 10:54:58 -01:00 committed by GitHub
parent 2957a51e4e
commit 0fca96cdab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 129 additions and 42 deletions

View File

@ -312,6 +312,10 @@ jobs:
- name: Build Docker release
run: |
docker build -t motoserver/moto . --tag moto:latest
# Required to get the correct Digest
# See https://github.com/docker/build-push-action/issues/461
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:

View File

@ -49,12 +49,17 @@ jobs:
- name: Build Docker release
run: |
docker build -t motoserver/moto . --tag moto:${{ env.VERSION }}
# Required to get the correct Digest
# See https://github.com/docker/build-push-action/issues/461
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- id: build_and_push
name: Build and push
uses: docker/build-push-action@v2
with:
push: true
@ -62,8 +67,10 @@ jobs:
- name: Increase patch version number
run: |
python update_version_from_git.py patch
sed -i 's/Docker Digest for ${{ env.VERSION }}: <autopopulateddigest>/Docker Digest for ${{ env.VERSION }}: _${{ steps.build_and_push.outputs.digest }}_/' CHANGELOG.md
git config --local user.email "admin@getmoto.org"
git config --local user.name "Moto Admin"
git add moto/__init__.py
git commit -m "Increase version number post-release"
git add CHANGELOG.md
git commit -m "Post-release steps"
git push

View File

@ -1,6 +1,52 @@
Moto Changelog
===================
3.0.5
-----
Docker Digest for 3.0.5: <autopopulateddigest>
TBD
3.0.4
-----
Docker Digest for 3.0.4: <autopopulateddigest>
New Services:
* Redshift-Data:
* cancel_statement()
* describe_statement()
* execute_statement()
* get_statement_result()
* Servicediscovery/Cloudmap:
* create_http_namespace()
* create_private_dns_namespace()
* create_public_dns_namespace()
* create_service()
* delete_namespace()
* delete_service()
* get_namespace()
* get_operation()
* get_service()
* list_namespaces()
* list_operations()
* list_services()
* list_tags_for_resource()
* tag_resource()
* untag_resource()
* update_service()
New Methods:
* Athena:
* create_data_catalog()
* get_data_catalog()
* list_data_catalogs()
* SES:
* get_identity_mail_from_domain_attributes()
* set_identity_mail_from_domain()
Miscellaneous:
* SSM: Global infrastructure parameters supplied by AWS are now available in Moto
3.0.3
-----

View File

@ -297,11 +297,11 @@
## athena
<details>
<summary>20% implemented</summary>
<summary>29% implemented</summary>
- [ ] batch_get_named_query
- [ ] batch_get_query_execution
- [ ] create_data_catalog
- [X] create_data_catalog
- [X] create_named_query
- [ ] create_prepared_statement
- [X] create_work_group
@ -309,7 +309,7 @@
- [ ] delete_named_query
- [ ] delete_prepared_statement
- [ ] delete_work_group
- [ ] get_data_catalog
- [X] get_data_catalog
- [ ] get_database
- [X] get_named_query
- [ ] get_prepared_statement
@ -317,7 +317,7 @@
- [ ] get_query_results
- [ ] get_table_metadata
- [X] get_work_group
- [ ] list_data_catalogs
- [X] list_data_catalogs
- [ ] list_databases
- [ ] list_engine_versions
- [ ] list_named_queries
@ -480,6 +480,7 @@
- [ ] deregister_type
- [ ] describe_account_limits
- [X] describe_change_set
- [ ] describe_change_set_hooks
- [ ] describe_publisher
- [ ] describe_stack_drift_detection_status
- [ ] describe_stack_events
@ -1760,6 +1761,7 @@
- [X] import_key_pair
- [ ] import_snapshot
- [ ] import_volume
- [ ] list_images_in_recycle_bin
- [ ] list_snapshots_in_recycle_bin
- [ ] modify_address_attribute
- [ ] modify_availability_zone_group
@ -1854,6 +1856,7 @@
- [ ] reset_network_interface_attribute
- [ ] reset_snapshot_attribute
- [ ] restore_address_to_classic
- [ ] restore_image_from_recycle_bin
- [ ] restore_managed_prefix_list_version
- [ ] restore_snapshot_from_recycle_bin
- [ ] restore_snapshot_tier
@ -2373,7 +2376,7 @@
## es
<details>
<summary>10% implemented</summary>
<summary>9% implemented</summary>
- [ ] accept_inbound_cross_cluster_search_connection
- [ ] add_tags
@ -2388,6 +2391,7 @@
- [ ] delete_outbound_cross_cluster_search_connection
- [ ] delete_package
- [ ] describe_domain_auto_tunes
- [ ] describe_domain_change_progress
- [X] describe_elasticsearch_domain
- [ ] describe_elasticsearch_domain_config
- [ ] describe_elasticsearch_domains
@ -4152,17 +4156,14 @@
## redshift-data
<details>
<summary>30% implemented</summary>
<summary>40% implemented</summary>
- [ ] batch_execute_statement
- [ ] can_paginate
- [X] cancel_statement
- [X] describe_statement
- [ ] describe_table
- [X] execute_statement
- [ ] get_paginator
- [X] get_statement_result
- [ ] get_waiter
- [ ] list_databases
- [ ] list_schemas
- [ ] list_statements
@ -4844,7 +4845,7 @@
## ses
<details>
<summary>32% implemented</summary>
<summary>35% implemented</summary>
- [ ] clone_receipt_rule_set
- [X] create_configuration_set
@ -5360,9 +5361,11 @@
- [ ] delete_web_acl
- [ ] describe_managed_rule_group
- [ ] disassociate_web_acl
- [ ] generate_mobile_sdk_release_url
- [ ] get_ip_set
- [ ] get_logging_configuration
- [ ] get_managed_rule_set
- [ ] get_mobile_sdk_release
- [ ] get_permission_policy
- [ ] get_rate_based_statement_managed_keys
- [ ] get_regex_pattern_set
@ -5375,6 +5378,7 @@
- [ ] list_ip_sets
- [ ] list_logging_configurations
- [ ] list_managed_rule_sets
- [ ] list_mobile_sdk_releases
- [ ] list_regex_pattern_sets
- [ ] list_resources_for_web_acl
- [ ] list_rule_groups
@ -5555,7 +5559,6 @@
- quicksight
- rbin
- rds-data
- redshift-data
- rekognition
- resiliencehub
- robomaker

View File

@ -9,6 +9,9 @@ Non-Python SDK's / Server Mode
Moto has a stand-alone server mode. This allows you to use Moto with any of the official AWS SDK's.
Installation
-------------
Install the required dependencies using:
.. code:: bash
@ -41,10 +44,18 @@ interfaces with 0.0.0.0:
Please be aware this might allow other network users to access your
server.
To use Moto in your tests, you can pass the `endpoint_url`-parameter to the SDK of your choice.
Run using Docker
----------------------
You could also use the official Docker image from https://hub.docker.com/r/motoserver/moto/tags:
Examples
--------
.. code-block:: bash
docker run motoserver/moto:latest
Example Usage
--------------
To use Moto in your tests, pass the `endpoint_url`-parameter to the SDK of your choice.
In Python:

View File

@ -17,7 +17,7 @@ application-autoscaling
.. sourcecode:: python
@mock_applicationautoscaling
def test_application-autoscaling_behaviour:
def test_applicationautoscaling_behaviour:
boto3.client("application-autoscaling")
...

View File

@ -27,7 +27,7 @@ athena
- [ ] batch_get_named_query
- [ ] batch_get_query_execution
- [ ] create_data_catalog
- [X] create_data_catalog
- [X] create_named_query
- [ ] create_prepared_statement
- [X] create_work_group
@ -35,7 +35,7 @@ athena
- [ ] delete_named_query
- [ ] delete_prepared_statement
- [ ] delete_work_group
- [ ] get_data_catalog
- [X] get_data_catalog
- [ ] get_database
- [X] get_named_query
- [ ] get_prepared_statement
@ -43,7 +43,7 @@ athena
- [ ] get_query_results
- [ ] get_table_metadata
- [X] get_work_group
- [ ] list_data_catalogs
- [X] list_data_catalogs
- [ ] list_databases
- [ ] list_engine_versions
- [ ] list_named_queries

View File

@ -41,6 +41,7 @@ cloudformation
- [ ] deregister_type
- [ ] describe_account_limits
- [X] describe_change_set
- [ ] describe_change_set_hooks
- [ ] describe_publisher
- [ ] describe_stack_drift_detection_status
- [ ] describe_stack_events

View File

@ -17,7 +17,7 @@ cognito-identity
.. sourcecode:: python
@mock_cognitoidentity
def test_cognito-identity_behaviour:
def test_cognitoidentity_behaviour:
boto3.client("cognito-identity")
...

View File

@ -17,7 +17,7 @@ cognito-idp
.. sourcecode:: python
@mock_cognitoidp
def test_cognito-idp_behaviour:
def test_cognitoidp_behaviour:
boto3.client("cognito-idp")
...

View File

@ -17,7 +17,7 @@ dynamodb
.. sourcecode:: python
@mock_dynamodb2
def test_dynamodb_behaviour:
def test_dynamodb2_behaviour:
boto3.client("dynamodb")
...

View File

@ -17,7 +17,7 @@ ec2-instance-connect
.. sourcecode:: python
@mock_ec2instanceconnect
def test_ec2-instance-connect_behaviour:
def test_ec2instanceconnect_behaviour:
boto3.client("ec2-instance-connect")
...

View File

@ -454,6 +454,7 @@ ec2
- [X] import_key_pair
- [ ] import_snapshot
- [ ] import_volume
- [ ] list_images_in_recycle_bin
- [ ] list_snapshots_in_recycle_bin
- [ ] modify_address_attribute
- [ ] modify_availability_zone_group
@ -552,6 +553,7 @@ ec2
- [ ] reset_network_interface_attribute
- [ ] reset_snapshot_attribute
- [ ] restore_address_to_classic
- [ ] restore_image_from_recycle_bin
- [ ] restore_managed_prefix_list_version
- [ ] restore_snapshot_from_recycle_bin
- [ ] restore_snapshot_tier

View File

@ -19,7 +19,7 @@ emr-containers
.. sourcecode:: python
@mock_emrcontainers
def test_emr-containers_behaviour:
def test_emrcontainers_behaviour:
boto3.client("emr-containers")
...

View File

@ -40,6 +40,7 @@ es
- [ ] delete_outbound_cross_cluster_search_connection
- [ ] delete_package
- [ ] describe_domain_auto_tunes
- [ ] describe_domain_change_progress
- [X] describe_elasticsearch_domain
- [ ] describe_elasticsearch_domain_config
- [ ] describe_elasticsearch_domains

View File

@ -17,7 +17,7 @@ iot-data
.. sourcecode:: python
@mock_iotdata
def test_iot-data_behaviour:
def test_iotdata_behaviour:
boto3.client("iot-data")
...

View File

@ -17,7 +17,7 @@ kinesis-video-archived-media
.. sourcecode:: python
@mock_kinesisvideoarchivedmedia
def test_kinesis-video-archived-media_behaviour:
def test_kinesisvideoarchivedmedia_behaviour:
boto3.client("kinesis-video-archived-media")
...

View File

@ -17,7 +17,7 @@ mediastore-data
.. sourcecode:: python
@mock_mediastoredata
def test_mediastore-data_behaviour:
def test_mediastoredata_behaviour:
boto3.client("mediastore-data")
...

View File

@ -17,7 +17,7 @@ rds
.. sourcecode:: python
@mock_rds2
def test_rds_behaviour:
def test_rds2_behaviour:
boto3.client("rds")
...

View File

@ -8,16 +8,16 @@
</h3>
========
=============
redshift-data
========
=============
|start-h3| Example usage |end-h3|
.. sourcecode:: python
@mock_redshiftdata
def test_redshift_behaviour:
def test_redshiftdata_behaviour:
boto3.client("redshift-data")
...
@ -26,15 +26,24 @@ redshift-data
|start-h3| Implemented features for this service |end-h3|
- [ ] batch_execute_statement
- [ ] can_paginate
- [X] cancel_statement
- [X] describe_statement
- [ ] describe_table
- [X] execute_statement
- [ ] get_paginator
Runs an SQL statement
Validation of parameters is very limited because there is no redshift integration
- [X] get_statement_result
- [ ] get_waiter
Return static statement result
StatementResult is the result of the SQL query "sql" passed as parameter when calling "execute_statement"
As such, it cannot be mocked
- [ ] list_databases
- [ ] list_schemas
- [ ] list_statements
- [ ] list_tables

View File

@ -17,7 +17,7 @@ resource-groups
.. sourcecode:: python
@mock_resourcegroups
def test_resource-groups_behaviour:
def test_resourcegroups_behaviour:
boto3.client("resource-groups")
...

View File

@ -52,7 +52,7 @@ ses
- [ ] get_account_sending_enabled
- [ ] get_custom_verification_email_template
- [ ] get_identity_dkim_attributes
- [ ] get_identity_mail_from_domain_attributes
- [X] get_identity_mail_from_domain_attributes
- [X] get_identity_notification_attributes
- [ ] get_identity_policies
- [ ] get_identity_verification_attributes
@ -80,7 +80,7 @@ ses
- [ ] set_identity_dkim_enabled
- [X] set_identity_feedback_forwarding_enabled
- [ ] set_identity_headers_in_notifications_enabled
- [ ] set_identity_mail_from_domain
- [X] set_identity_mail_from_domain
- [X] set_identity_notification_topic
- [ ] set_receipt_rule_position
- [ ] test_render_template

View File

@ -19,7 +19,7 @@ sso-admin
.. sourcecode:: python
@mock_ssoadmin
def test_sso-admin_behaviour:
def test_ssoadmin_behaviour:
boto3.client("sso-admin")
...

View File

@ -17,7 +17,7 @@ timestream-write
.. sourcecode:: python
@mock_timestreamwrite
def test_timestream-write_behaviour:
def test_timestreamwrite_behaviour:
boto3.client("timestream-write")
...

View File

@ -42,9 +42,11 @@ wafv2
- [ ] delete_web_acl
- [ ] describe_managed_rule_group
- [ ] disassociate_web_acl
- [ ] generate_mobile_sdk_release_url
- [ ] get_ip_set
- [ ] get_logging_configuration
- [ ] get_managed_rule_set
- [ ] get_mobile_sdk_release
- [ ] get_permission_policy
- [ ] get_rate_based_statement_managed_keys
- [ ] get_regex_pattern_set
@ -57,6 +59,7 @@ wafv2
- [ ] list_ip_sets
- [ ] list_logging_configurations
- [ ] list_managed_rule_sets
- [ ] list_mobile_sdk_releases
- [ ] list_regex_pattern_sets
- [ ] list_resources_for_web_acl
- [ ] list_rule_groups

View File

@ -81,7 +81,7 @@ class VPCServiceConfigurationBackend(object):
else:
raise UnknownVpcEndpointService(service_id)
return found_configs
return self.configurations.values()
return self.configurations.copy().values()
def delete_vpc_endpoint_service_configurations(self, service_ids):
missing = [s for s in service_ids if s not in self.configurations]

View File

@ -221,7 +221,7 @@ def write_implementation_coverage_to_docs(coverage):
file.write(f""".. sourcecode:: python
@{coverage[service_name]['name']}
def test_{service_name}_behaviour:
def test_{coverage[service_name]['name'][5:]}_behaviour:
boto3.client("{service_name}")
...