Skip to content

SES: add snapshot test for describe_configuration_set with SNS destinations #12814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions tests/aws/services/ses/test_ses.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,37 @@ def _assert_sent_quota(expected_counter: int) -> dict:
_ = retry(_assert_sent_quota, expected_counter=counter + 1, retries=retries, sleep=1)
# snapshot.match('get-quota-3', _)

@markers.aws.validated
def test_describe_config_set_event_destinations(
self,
aws_client,
sns_topic,
ses_configuration_set,
ses_configuration_set_sns_event_destination,
snapshot,
):
config_set_name = f"config-set-{short_uid()}"
snapshot.add_transformer(snapshot.transform.regex(config_set_name, "<config-set-name>"))

topic_arn = sns_topic["Attributes"]["TopicArn"]
snapshot.add_transformer(snapshot.transform.regex(topic_arn, "<arn>"))

ses_configuration_set(config_set_name)
event_destination_name = f"config-set-event-destination-{short_uid()}"
snapshot.add_transformer(
snapshot.transform.regex(event_destination_name, "<event-destination-name>")
)

ses_configuration_set_sns_event_destination(
config_set_name, event_destination_name, topic_arn
)

response = aws_client.ses.describe_configuration_set(
ConfigurationSetName=config_set_name,
ConfigurationSetAttributeNames=["eventDestinations"],
)
snapshot.match("event_destinations", response)

@markers.aws.validated
@markers.snapshot.skip_snapshot_verify(
paths=[
Expand Down
30 changes: 30 additions & 0 deletions tests/aws/services/ses/test_ses.snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,5 +915,35 @@
}
}
}
},
"tests/aws/services/ses/test_ses.py::TestSES::test_describe_config_set_event_destinations": {
"recorded-date": "29-06-2025, 09:05:24",
"recorded-content": {
"event_destinations": {
"ConfigurationSet": {
"Name": "<config-set-name>"
},
"EventDestinations": [
{
"Enabled": true,
"MatchingEventTypes": [
"bounce",
"click",
"delivery",
"open",
"send"
],
"Name": "<event-destination-name>",
"SNSDestination": {
"TopicARN": "<arn>"
}
}
],
"ResponseMetadata": {
"HTTPHeaders": {},
"HTTPStatusCode": 200
}
}
}
}
}
9 changes: 9 additions & 0 deletions tests/aws/services/ses/test_ses.validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
"tests/aws/services/ses/test_ses.py::TestSES::test_deleting_non_existent_configuration_set_event_destination": {
"last_validated_date": "2023-08-25T22:04:53+00:00"
},
"tests/aws/services/ses/test_ses.py::TestSES::test_describe_config_set_event_destinations": {
"last_validated_date": "2025-06-29T09:05:51+00:00",
"durations_in_seconds": {
"setup": 2.42,
"call": 1.82,
"teardown": 1.05,
"total": 5.29
}
},
"tests/aws/services/ses/test_ses.py::TestSES::test_invalid_tags_send_email[-]": {
"last_validated_date": "2024-07-30T10:18:09+00:00"
},
Expand Down
Loading