.. | ||
__init__.py | ||
README.md | ||
test_ecr.py | ||
test_glacier.py | ||
test_iam.py | ||
test_kms.py | ||
test_s3.py | ||
test_secrets_manager.py | ||
test_ses.py | ||
test_sns.py | ||
test_sqs.py |
Moto support status per service
- ACM PCA: ❌ Not supported by Moto
delete_policy
: ❌ Not supportedget_policy
: ❌ Not supportedlist_certificate_authorities
: ❌ Not supportedput_policy
: ❌ Not supported
- CloudWatch Logs: ❌ Resource policy not supported by Moto
describe_resource_policies
: ❌ Not supporteddelete_resource_policy
: ❌ Not supportedput_resource_policy
: ❌ Not supported
- ECR
describe_repositories
: ✅ Supporteddelete_repository_policy
: ❌ Not supportedget_repository_policy
: ❌ Not supported ⁉️set_repository_policy
: ❌ Not supported
- EFS: ❌ Not supported by Moto
describe_file_system_policy
: ❌ Not supporteddescribe_file_systems
: ❌ Not supportedput_file_system_policy
: ❌ Not supported
- ElasticSearch: ❌ Not supported by Moto
describe_elasticsearch_domain_config
: Not supportedlist_domain_names
: Not supportedupdate_elasticsearch_domain_config
: Not supported
- Glacier Vault
get_vault_access_policy
: ❌ Not supportedlist_vaults
: ❌ Not supported ⁉️set_vault_access_policy
: ❌ Not supported
- IAM
get_role
: ✅ Supportedlist_roles
: ✅ Supportedupdate_assume_role_policy
: ✅ Supported
- KMS
get_key_policy
: ✅ Supportedlist_keys
: ✅ Supportedlist_aliases
: ❌ Not supported ⁉️put_key_policy
: ✅ Supported
- Lambda Function
list_functions
: ✅ Supportedget_function_policy
: ✅ Supportedadd_permission
: ✅ Supportedremove_permission
: ✅ Supported
- Lambda Layer:
list_layers
: ✅ Supportedlist_layer_versions
: ❌ Not supportedadd_layer_version_permission
: ❌ Not supportedremove_layer_version_permission
: ❌ Not supported
- S3:
get_bucket_policy
: ✅ Supportedput_bucket_policy
: ✅ Supportedlist_buckets
: ✅ Supported
- Secrets Manager
delete_resource_policy
: ❌ Not supportedget_resource_policy
: ✅ Supportedlist_secrets
: ✅ Supportedput_resource_policy
: ❌ Not supported
- SES
delete_identity_policy
: ❌ Not supportedget_identity_policies
: ❌ Not supportedlist_identities
: ✅ Supportedlist_identity_policies
: ❌ Not supportedput_identity_policy
: ❌ Not supported
- SNS
add_permission
: ✅ Supportedget_topic_attributes
: ✅ Supportedremove_permission
: ✅ Supportedlist_topics
: ✅ Supported
- SQS
add_permission
: ✅ Supportedget_queue_url
: ✅ Supportedget_queue_attributes
: ✅ Supportedlist_queues
: ✅ Supportedremove_permission
: ✅ Supported
Unit test structure per service
We want to cover the following in each unit test:
setUp
test_list_resources
- Passing case: If exists, assert name is expected
- Exception handling: If does not exist, show error message but don't break
test_get_rbp
- Expected initial policy content
test_set_rbp
- Expected policy content after updating
- Exception handling in case of
botocore.exceptions.ClientError
test_add_myself
- Expected policy content after updating
- Exception handling in case of
botocore.exceptions.ClientError
tearDown
Notes
ECR: 🟡 Partially supported. test_get_rbp
possible
Glacier Vault. Looks like list_vaults
is under mock_glacier_deprecated
KMS: ✅ possible. TODO: Need to update with put_key_policy
from mock_kms_deprecated