* Support - added refresh_trusted_advisor_check
- Returns a random check status
- Returns the check id in the response
- Testing for these two functionalities
* test_support - addressed PR comments, to cycle through a faked number of
check status responses
* pool domain should always return a domain
Refs https://github.com/spulec/moto/issues/3706
* set character encoding
* test CloudFrontDomain exists on pool domain
* describe pool domain does not return cloudfront domain
* Support Podman for mocking Lambda
Podman supports all Docker APIs used in moto since version 3.0. Note
that Podman requires pulling the image before creating a container
using a fully-qualified image name (e.g., "docker.io/library/busybox"
instead of "busybox").
Test plan:
$ podman system service -t 0
$ DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" pytest
Fixes https://github.com/spulec/moto/issues/3276
* Run black
* Python 2 compatibility
* Address review comments and improve parse_image_ref
* Fix: DynamoDB:GetItem throws wrong error when table doesn't exist
* Use unique exception for table not found, per PR feedback
* Just fix the reported issue, without touching anything else...
* 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
* support - intial commit to kick off trusted advisor checks
* edit - expanded testing to include checking for expected check ids and
check names.
Added server testing
added support resource json to manifest file and simplified
support response return from reviewed comments
* Streamline loading of resource files
* edit - ensured regions are assigned in models
Co-authored-by: Bert Blommers <info@bertblommers.nl>
AWS requires certain parameters to be mutually inclusive.
Moto wasn't doing anything with the InstanceId parameter, which is now made
clear with a TODO.
* Fix `DBInstanceNotFound` error message
Changed from `Database` to `DBInstance`, which is actually what comes back from AWS.
* Remove duplicate test
The removed test actually fails if run in isolation because `rds2` is not a
valid boto3 client service. The reason this test never caused CI to fail is
because it is redefined later in the test suite, effectively making it dead
code that will never run.
Duplicate test has been removed and the remaining test has been improved
with more explicit asserts.
* fix heartbeatTimeout of NONE resulting in ValueError and polling returning empty string taskToken when it shouldn't be returned
* fix expected taskToken in impacted tests
Co-authored-by: Clint Parham <cparham@aligntech.com>
* correct exceptions when mising parameters
* test_render_template function
* update ses template function
* fix import
* except fixed
* tests and py2 fix
* Add support for RDS resource filtering
* Extensive testing was performed against real AWS endpoints in order to
nail down the filter behavior under various scenarios, ensuring that
`moto` returns the proper response or error.
* Full test coverage of all utility functions as well as several
filter/parameter combinations.
* Split up filter tests, per PR feedback
* Remove unused import
* Fix pytest teardown failure on Python 2.7
* Update the s3 post functionality to better support success_action_redirect
- Add the bucket/key values to the redirect url like s3 does, which
supports code that relies on the key value being there on the
redirect.
- Add support for replacing ${filename} in the key value with the actual
filename from the form upload.
See Issue #3667
* Update s3 tests for changed success_action_redirect behavior
- Adds a new test called test_s3_server_post_to_bucket_redirect that
tests both the ${filename} replacement and the key/value addition to the
redirect query args
- Updated the test_creating_presigned_post checks to handle the
key/value additions to the redirect url.
* Fix test updates to work with python2.7
- remove f-string usage
- fix urllib.parse imports to use six
Co-authored-by: Wynn Wilkes <wynn@leading2lean.com>
* Add KmsKeyId to Redshift Cluster
Add the KmsKeyId property when creating a cluster so that it is also
returned when querying the describe_clusters endpoint.
* Run black on updated files
* Add unit test for Redshift KmsKeyId
* Re-run black with correct version
In e9dc5edf7f a custom error template
was added to correct the response returned by get_endpoint_attributes
for a non-existent endpoint.
However, after some more inspection, it was found that a valid
template already existed in moto/sns/responses.py.
This commit removes the template introduced in e9dc5ed and takes
into use the existing template.
It is a marginal improvement, but helps keeping a cleaner code
base
Co-authored-by: Antillon, Alejandro <alejandro.antillon@f-secure.com>
The response returned for sns.get_endpoint_attributes was not in
sync with the actual response from boto.
Co-authored-by: Antillon, Alejandro <alejandro.antillon@f-secure.com>
These tests, when run, do not execute any `moto` code. They fail the
parameter validation check in `botocore`, which raises an exception
before ever sending a request. These tests do not cover or verify
any `moto` behavior and have been removed.
The `botocore` response parsers are forgiving when it comes to timestamps,
but a real AWS backend does return time zone details for this attribute.
Verified failure/fix using the Go repo included in the issue report.
Fixes#3516