From 93515763a8952cf4371169507fa6dd52cb735591 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Fri, 6 Dec 2024 18:08:27 +0100 Subject: [PATCH 01/10] feat: move api destination and connection tests to separate test file --- tests/aws/services/events/conftest.py | 13 + .../test_api_destinations_and_connection.py | 399 ++++++++++++ tests/aws/services/events/test_events.py | 572 +----------------- 3 files changed, 414 insertions(+), 570 deletions(-) create mode 100644 tests/aws/services/events/test_api_destinations_and_connection.py diff --git a/tests/aws/services/events/conftest.py b/tests/aws/services/events/conftest.py index f098f925601bf..129a5b4779f28 100644 --- a/tests/aws/services/events/conftest.py +++ b/tests/aws/services/events/conftest.py @@ -4,6 +4,7 @@ import pytest +from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.aws.arns import get_partition from localstack.utils.strings import short_uid from localstack.utils.sync import retry @@ -445,3 +446,15 @@ def _create_api_destination(**kwargs): ) return _create_api_destination + + +@pytest.fixture +def api_destination_snapshots(snapshot, destination_name): + """Common snapshot transformers for API destination tests.""" + return TransformerUtility.eventbridge_api_destination(snapshot, destination_name) + + +@pytest.fixture(autouse=True) +def connection_snapshots(snapshot, connection_name): + """Common snapshot transformers for connection tests.""" + return TransformerUtility.eventbridge_connection(snapshot, connection_name) diff --git a/tests/aws/services/events/test_api_destinations_and_connection.py b/tests/aws/services/events/test_api_destinations_and_connection.py new file mode 100644 index 0000000000000..490f24128300a --- /dev/null +++ b/tests/aws/services/events/test_api_destinations_and_connection.py @@ -0,0 +1,399 @@ +import pytest +from botocore.exceptions import ClientError + +from localstack.testing.pytest import markers +from localstack.utils.sync import poll_condition +from tests.aws.services.events.helper_functions import is_old_provider + +API_DESTINATION_AUTHS = [ + { + "type": "BASIC", + "key": "BasicAuthParameters", + "parameters": {"Username": "user", "Password": "pass"}, + }, + { + "type": "API_KEY", + "key": "ApiKeyAuthParameters", + "parameters": {"ApiKeyName": "Api", "ApiKeyValue": "apikey_secret"}, + }, + { + "type": "OAUTH_CLIENT_CREDENTIALS", + "key": "OAuthParameters", + "parameters": { + "AuthorizationEndpoint": "replace_this", + "ClientParameters": {"ClientID": "id", "ClientSecret": "password"}, + "HttpMethod": "put", + "OAuthHttpParameters": { + "BodyParameters": [{"Key": "oauthbody", "Value": "value1"}], + "HeaderParameters": [{"Key": "oauthheader", "Value": "value2"}], + "QueryStringParameters": [{"Key": "oauthquery", "Value": "value3"}], + }, + }, + }, +] + +API_DESTINATION_AUTHS = [ + { + "type": "BASIC", + "key": "BasicAuthParameters", + "parameters": {"Username": "user", "Password": "pass"}, + }, + { + "type": "API_KEY", + "key": "ApiKeyAuthParameters", + "parameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, + }, + { + "type": "OAUTH_CLIENT_CREDENTIALS", + "key": "OAuthParameters", + "parameters": { + "ClientParameters": {"ClientID": "id", "ClientSecret": "password"}, + "AuthorizationEndpoint": "https://example.com/oauth", + "HttpMethod": "POST", + "OAuthHttpParameters": { + "BodyParameters": [{"Key": "oauthbody", "Value": "value1", "IsValueSecret": False}], + "HeaderParameters": [ + {"Key": "oauthheader", "Value": "value2", "IsValueSecret": False} + ], + "QueryStringParameters": [ + {"Key": "oauthquery", "Value": "value3", "IsValueSecret": False} + ], + }, + }, + }, +] + +API_DESTINATION_AUTH_PARAMS = [ + { + "AuthorizationType": "BASIC", + "AuthParameters": { + "BasicAuthParameters": {"Username": "user", "Password": "pass"}, + }, + }, + { + "AuthorizationType": "API_KEY", + "AuthParameters": { + "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, + }, + }, + { + "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", + "AuthParameters": { + "OAuthParameters": { + "AuthorizationEndpoint": "https://example.com/oauth", + "ClientParameters": {"ClientID": "client_id", "ClientSecret": "client_secret"}, + "HttpMethod": "POST", + } + }, + }, +] + + +class TestEventBridgeApiDestinations: + @markers.aws.validated + @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_api_destinations( + self, + aws_client, + api_destination_snapshots, + create_connection, + create_api_destination, + destination_name, + auth, + ): + connection_response = create_connection(auth) + connection_arn = connection_response["ConnectionArn"] + + response = create_api_destination( + ConnectionArn=connection_arn, + HttpMethod="POST", + InvocationEndpoint="https://example.com/api", + Description="Test API destination", + ) + api_destination_snapshots.match("create-api-destination", response) + + describe_response = aws_client.events.describe_api_destination(Name=destination_name) + api_destination_snapshots.match("describe-api-destination", describe_response) + + list_response = aws_client.events.list_api_destinations(NamePrefix=destination_name) + api_destination_snapshots.match("list-api-destinations", list_response) + + update_response = aws_client.events.update_api_destination( + Name=destination_name, + ConnectionArn=connection_arn, + HttpMethod="PUT", + InvocationEndpoint="https://example.com/api/v2", + Description="Updated API destination", + ) + api_destination_snapshots.match("update-api-destination", update_response) + + describe_updated_response = aws_client.events.describe_api_destination( + Name=destination_name + ) + api_destination_snapshots.match( + "describe-updated-api-destination", describe_updated_response + ) + + delete_response = aws_client.events.delete_api_destination(Name=destination_name) + api_destination_snapshots.match("delete-api-destination", delete_response) + + with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc_info: + aws_client.events.describe_api_destination(Name=destination_name) + api_destination_snapshots.match( + "describe-api-destination-not-found-error", exc_info.value.response + ) + + @markers.aws.validated + @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") + def test_create_api_destination_invalid_parameters( + self, aws_client, api_destination_snapshots, connection_name, destination_name + ): + with pytest.raises(ClientError) as e: + aws_client.events.create_api_destination( + Name=destination_name, + ConnectionArn="invalid-connection-arn", + HttpMethod="INVALID_METHOD", + InvocationEndpoint="invalid-endpoint", + ) + api_destination_snapshots.match( + "create-api-destination-invalid-parameters-error", e.value.response + ) + + @markers.aws.validated + @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") + def test_create_api_destination_name_validation( + self, aws_client, api_destination_snapshots, create_connection, connection_name + ): + invalid_name = "Invalid Name With Spaces!" + + connection_response = create_connection(API_DESTINATION_AUTHS[0]) + connection_arn = connection_response["ConnectionArn"] + + with pytest.raises(ClientError) as e: + aws_client.events.create_api_destination( + Name=invalid_name, + ConnectionArn=connection_arn, + HttpMethod="POST", + InvocationEndpoint="https://example.com/api", + ) + api_destination_snapshots.match( + "create-api-destination-invalid-name-error", e.value.response + ) + + +class TestEventBridgeApiDestinationConnections: + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_create_connection(self, aws_client, snapshot, create_connection, connection_name): + response = create_connection( + "API_KEY", + { + "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, + "InvocationHttpParameters": {}, + }, + ) + snapshot.match("create-connection", response) + + describe_response = aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-connection", describe_response) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + @pytest.mark.parametrize("auth_params", API_DESTINATION_AUTH_PARAMS) + def test_create_connection_with_auth( + self, aws_client, snapshot, create_connection, auth_params, connection_name + ): + response = create_connection( + auth_params["AuthorizationType"], + auth_params["AuthParameters"], + ) + snapshot.match("create-connection-auth", response) + + describe_response = aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-connection-auth", describe_response) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_list_connections(self, aws_client, snapshot, create_connection, connection_name): + create_connection( + "BASIC", + { + "BasicAuthParameters": {"Username": "user", "Password": "pass"}, + "InvocationHttpParameters": {}, + }, + ) + + response = aws_client.events.list_connections(NamePrefix=connection_name) + snapshot.match("list-connections", response) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_delete_connection(self, aws_client, snapshot, create_connection, connection_name): + response = create_connection( + "API_KEY", + { + "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, + "InvocationHttpParameters": {}, + }, + ) + snapshot.match("create-connection-response", response) + + secret_arn = aws_client.events.describe_connection(Name=connection_name)["SecretArn"] + # check if secret exists + aws_client.secretsmanager.describe_secret(SecretId=secret_arn) + + delete_response = aws_client.events.delete_connection(Name=connection_name) + snapshot.match("delete-connection", delete_response) + + # wait until connection is deleted + def is_connection_deleted(): + try: + aws_client.events.describe_connection(Name=connection_name) + return False + except Exception: + return True + + poll_condition(is_connection_deleted) + + with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc: + aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-deleted-connection", exc.value.response) + + def is_secret_deleted(): + try: + aws_client.secretsmanager.describe_secret(SecretId=secret_arn) + return False + except Exception: + return True + + poll_condition(is_secret_deleted) + + with pytest.raises(aws_client.secretsmanager.exceptions.ResourceNotFoundException): + aws_client.secretsmanager.describe_secret(SecretId=secret_arn) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_create_connection_invalid_parameters(self, aws_client, snapshot, connection_name): + with pytest.raises(ClientError) as e: + aws_client.events.create_connection( + Name=connection_name, + AuthorizationType="INVALID_AUTH_TYPE", + AuthParameters={}, + ) + snapshot.match("create-connection-invalid-auth-error", e.value.response) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_update_connection(self, aws_client, snapshot, create_connection, connection_name): + create_response = create_connection( + "BASIC", + { + "BasicAuthParameters": {"Username": "user", "Password": "pass"}, + "InvocationHttpParameters": {}, + }, + ) + snapshot.match("create-connection", create_response) + + describe_response = aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-created-connection", describe_response) + + # add secret id transformer + secret_id = describe_response["SecretArn"] + secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") + snapshot.add_transformer( + snapshot.transform.regex(secret_uuid, ""), priority=-1 + ) + snapshot.add_transformer( + snapshot.transform.regex(secret_suffix, ""), priority=-1 + ) + + get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) + snapshot.match("connection-secret-before-update", get_secret_response) + + update_response = aws_client.events.update_connection( + Name=connection_name, + AuthorizationType="BASIC", + AuthParameters={ + "BasicAuthParameters": {"Username": "new_user", "Password": "new_pass"}, + "InvocationHttpParameters": {}, + }, + ) + snapshot.match("update-connection", update_response) + + describe_response = aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-updated-connection", describe_response) + + get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) + snapshot.match("connection-secret-after-update", get_secret_response) + + @markers.aws.validated + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_create_connection_name_validation(self, aws_client, snapshot, connection_name): + invalid_name = "Invalid Name With Spaces!" + + with pytest.raises(ClientError) as e: + aws_client.events.create_connection( + Name=invalid_name, + AuthorizationType="API_KEY", + AuthParameters={ + "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, + "InvocationHttpParameters": {}, + }, + ) + snapshot.match("create-connection-invalid-name-error", e.value.response) + + @markers.aws.validated + @pytest.mark.parametrize( + "auth_params", API_DESTINATION_AUTH_PARAMS, ids=["basic", "api-key", "oauth"] + ) + @pytest.mark.skipif( + is_old_provider(), + reason="V1 provider does not support this feature", + ) + def test_connection_secrets( + self, aws_client, snapshot, create_connection, connection_name, auth_params + ): + response = create_connection( + auth_params["AuthorizationType"], + auth_params["AuthParameters"], + ) + snapshot.match("create-connection-auth", response) + + describe_response = aws_client.events.describe_connection(Name=connection_name) + snapshot.match("describe-connection-auth", describe_response) + + secret_id = describe_response["SecretArn"] + secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") + snapshot.add_transformer( + snapshot.transform.regex(secret_uuid, ""), priority=-1 + ) + snapshot.add_transformer( + snapshot.transform.regex(secret_suffix, ""), priority=-1 + ) + get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) + snapshot.match("connection-secret", get_secret_response) diff --git a/tests/aws/services/events/test_events.py b/tests/aws/services/events/test_events.py index ffb3add447e3f..4264bdad28de8 100644 --- a/tests/aws/services/events/test_events.py +++ b/tests/aws/services/events/test_events.py @@ -2,7 +2,6 @@ Test creating and modifying event buses, as well as putting events to custom and the default bus. """ -import base64 import datetime import json import os @@ -13,18 +12,15 @@ import pytest from botocore.exceptions import ClientError from localstack_snapshot.snapshots.transformer import SortingTransformer -from pytest_httpserver import HTTPServer -from werkzeug import Request, Response from localstack import config from localstack.services.events.v1.provider import _get_events_tmp_dir from localstack.testing.aws.eventbus_utils import allow_event_rule_to_sqs_queue from localstack.testing.aws.util import is_aws_cloud from localstack.testing.pytest import markers -from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.files import load_file -from localstack.utils.strings import long_uid, short_uid, to_str -from localstack.utils.sync import poll_condition, retry +from localstack.utils.strings import long_uid, short_uid +from localstack.utils.sync import retry from tests.aws.services.events.helper_functions import ( assert_valid_event, is_old_provider, @@ -50,32 +46,6 @@ "detail": {"command": ["update-account"]}, } -API_DESTINATION_AUTHS = [ - { - "type": "BASIC", - "key": "BasicAuthParameters", - "parameters": {"Username": "user", "Password": "pass"}, - }, - { - "type": "API_KEY", - "key": "ApiKeyAuthParameters", - "parameters": {"ApiKeyName": "Api", "ApiKeyValue": "apikey_secret"}, - }, - { - "type": "OAUTH_CLIENT_CREDENTIALS", - "key": "OAuthParameters", - "parameters": { - "AuthorizationEndpoint": "replace_this", - "ClientParameters": {"ClientID": "id", "ClientSecret": "password"}, - "HttpMethod": "put", - "OAuthHttpParameters": { - "BodyParameters": [{"Key": "oauthbody", "Value": "value1"}], - "HeaderParameters": [{"Key": "oauthheader", "Value": "value2"}], - "QueryStringParameters": [{"Key": "oauthquery", "Value": "value3"}], - }, - }, - }, -] EVENT_BUS_ROLE = { "Statement": { @@ -283,165 +253,6 @@ def test_events_written_to_disk_are_timestamp_prefixed_for_chronological_orderin assert [json.loads(event["Detail"]) for event in sorted_events] == event_details_to_publish - @markers.aws.only_localstack - @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) - def test_api_destinations(self, httpserver: HTTPServer, auth, aws_client, clean_up): - token = short_uid() - bearer = f"Bearer {token}" - - def _handler(_request: Request): - return Response( - json.dumps( - { - "access_token": token, - "token_type": "Bearer", - "expires_in": 86400, - } - ), - mimetype="application/json", - ) - - httpserver.expect_request("").respond_with_handler(_handler) - http_endpoint = httpserver.url_for("/") - - if auth.get("type") == "OAUTH_CLIENT_CREDENTIALS": - auth["parameters"]["AuthorizationEndpoint"] = http_endpoint - - connection_name = f"c-{short_uid()}" - connection_arn = aws_client.events.create_connection( - Name=connection_name, - AuthorizationType=auth.get("type"), - AuthParameters={ - auth.get("key"): auth.get("parameters"), - "InvocationHttpParameters": { - "BodyParameters": [ - { - "Key": "connection_body_param", - "Value": "value", - "IsValueSecret": False, - }, - ], - "HeaderParameters": [ - { - "Key": "connection-header-param", - "Value": "value", - "IsValueSecret": False, - }, - { - "Key": "overwritten-header", - "Value": "original", - "IsValueSecret": False, - }, - ], - "QueryStringParameters": [ - { - "Key": "connection_query_param", - "Value": "value", - "IsValueSecret": False, - }, - { - "Key": "overwritten_query", - "Value": "original", - "IsValueSecret": False, - }, - ], - }, - }, - )["ConnectionArn"] - - # create api destination - dest_name = f"d-{short_uid()}" - result = aws_client.events.create_api_destination( - Name=dest_name, - ConnectionArn=connection_arn, - InvocationEndpoint=http_endpoint, - HttpMethod="POST", - ) - - # create rule and target - rule_name = f"r-{short_uid()}" - target_id = f"target-{short_uid()}" - pattern = json.dumps({"source": ["source-123"], "detail-type": ["type-123"]}) - aws_client.events.put_rule(Name=rule_name, EventPattern=pattern) - aws_client.events.put_targets( - Rule=rule_name, - Targets=[ - { - "Id": target_id, - "Arn": result["ApiDestinationArn"], - "Input": '{"target_value":"value"}', - "HttpParameters": { - "PathParameterValues": ["target_path"], - "HeaderParameters": { - "target-header": "target_header_value", - "overwritten_header": "changed", - }, - "QueryStringParameters": { - "target_query": "t_query", - "overwritten_query": "changed", - }, - }, - } - ], - ) - - entries = [ - { - "Source": "source-123", - "DetailType": "type-123", - "Detail": '{"i": 0}', - } - ] - aws_client.events.put_events(Entries=entries) - - # clean up - aws_client.events.delete_connection(Name=connection_name) - aws_client.events.delete_api_destination(Name=dest_name) - clean_up(rule_name=rule_name, target_ids=target_id) - - to_recv = 2 if auth["type"] == "OAUTH_CLIENT_CREDENTIALS" else 1 - poll_condition(lambda: len(httpserver.log) >= to_recv, timeout=5) - - event_request, _ = httpserver.log[-1] - event = event_request.get_json(force=True) - headers = event_request.headers - query_args = event_request.args - - # Connection data validation - assert event["connection_body_param"] == "value" - assert headers["Connection-Header-Param"] == "value" - assert query_args["connection_query_param"] == "value" - - # Target parameters validation - assert "/target_path" in event_request.path - assert event["target_value"] == "value" - assert headers["Target-Header"] == "target_header_value" - assert query_args["target_query"] == "t_query" - - # connection/target overwrite test - assert headers["Overwritten-Header"] == "original" - assert query_args["overwritten_query"] == "original" - - # Auth validation - match auth["type"]: - case "BASIC": - user_pass = to_str(base64.b64encode(b"user:pass")) - assert headers["Authorization"] == f"Basic {user_pass}" - case "API_KEY": - assert headers["Api"] == "apikey_secret" - - case "OAUTH_CLIENT_CREDENTIALS": - assert headers["Authorization"] == bearer - - oauth_request, _ = httpserver.log[0] - oauth_login = oauth_request.get_json(force=True) - # Oauth login validation - assert oauth_login["client_id"] == "id" - assert oauth_login["client_secret"] == "password" - assert oauth_login["oauthbody"] == "value1" - assert oauth_request.headers["oauthheader"] == "value2" - assert oauth_request.args["oauthquery"] == "value3" - @markers.aws.validated @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") def test_create_connection_validations(self, aws_client, snapshot): @@ -1809,382 +1620,3 @@ def test_put_target_id_validation( {"Id": target_id, "Arn": queue_arn, "InputPath": "$.detail"}, ], ) - - -API_DESTINATION_AUTH_PARAMS = [ - { - "AuthorizationType": "BASIC", - "AuthParameters": { - "BasicAuthParameters": {"Username": "user", "Password": "pass"}, - }, - }, - { - "AuthorizationType": "API_KEY", - "AuthParameters": { - "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - }, - }, - { - "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", - "AuthParameters": { - "OAuthParameters": { - "AuthorizationEndpoint": "https://example.com/oauth", - "ClientParameters": {"ClientID": "client_id", "ClientSecret": "client_secret"}, - "HttpMethod": "POST", - } - }, - }, -] - - -class TestEventBridgeConnections: - @pytest.fixture(autouse=True) - def connection_snapshots(self, snapshot, connection_name): - """Common snapshot transformers for connection tests.""" - return TransformerUtility.eventbridge_connection(snapshot, connection_name) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_create_connection(self, aws_client, snapshot, create_connection, connection_name): - response = create_connection( - "API_KEY", - { - "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - "InvocationHttpParameters": {}, - }, - ) - snapshot.match("create-connection", response) - - describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection", describe_response) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - @pytest.mark.parametrize("auth_params", API_DESTINATION_AUTH_PARAMS) - def test_create_connection_with_auth( - self, aws_client, snapshot, create_connection, auth_params, connection_name - ): - response = create_connection( - auth_params["AuthorizationType"], - auth_params["AuthParameters"], - ) - snapshot.match("create-connection-auth", response) - - describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection-auth", describe_response) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_list_connections(self, aws_client, snapshot, create_connection, connection_name): - create_connection( - "BASIC", - { - "BasicAuthParameters": {"Username": "user", "Password": "pass"}, - "InvocationHttpParameters": {}, - }, - ) - - response = aws_client.events.list_connections(NamePrefix=connection_name) - snapshot.match("list-connections", response) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_delete_connection(self, aws_client, snapshot, create_connection, connection_name): - response = create_connection( - "API_KEY", - { - "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - "InvocationHttpParameters": {}, - }, - ) - snapshot.match("create-connection-response", response) - - secret_arn = aws_client.events.describe_connection(Name=connection_name)["SecretArn"] - # check if secret exists - aws_client.secretsmanager.describe_secret(SecretId=secret_arn) - - delete_response = aws_client.events.delete_connection(Name=connection_name) - snapshot.match("delete-connection", delete_response) - - # wait until connection is deleted - def is_connection_deleted(): - try: - aws_client.events.describe_connection(Name=connection_name) - return False - except Exception: - return True - - poll_condition(is_connection_deleted) - - with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc: - aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-deleted-connection", exc.value.response) - - def is_secret_deleted(): - try: - aws_client.secretsmanager.describe_secret(SecretId=secret_arn) - return False - except Exception: - return True - - poll_condition(is_secret_deleted) - - with pytest.raises(aws_client.secretsmanager.exceptions.ResourceNotFoundException): - aws_client.secretsmanager.describe_secret(SecretId=secret_arn) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_create_connection_invalid_parameters(self, aws_client, snapshot, connection_name): - with pytest.raises(ClientError) as e: - aws_client.events.create_connection( - Name=connection_name, - AuthorizationType="INVALID_AUTH_TYPE", - AuthParameters={}, - ) - snapshot.match("create-connection-invalid-auth-error", e.value.response) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_update_connection(self, aws_client, snapshot, create_connection, connection_name): - create_response = create_connection( - "BASIC", - { - "BasicAuthParameters": {"Username": "user", "Password": "pass"}, - "InvocationHttpParameters": {}, - }, - ) - snapshot.match("create-connection", create_response) - - describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-created-connection", describe_response) - - # add secret id transformer - secret_id = describe_response["SecretArn"] - secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") - snapshot.add_transformer( - snapshot.transform.regex(secret_uuid, ""), priority=-1 - ) - snapshot.add_transformer( - snapshot.transform.regex(secret_suffix, ""), priority=-1 - ) - - get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret-before-update", get_secret_response) - - update_response = aws_client.events.update_connection( - Name=connection_name, - AuthorizationType="BASIC", - AuthParameters={ - "BasicAuthParameters": {"Username": "new_user", "Password": "new_pass"}, - "InvocationHttpParameters": {}, - }, - ) - snapshot.match("update-connection", update_response) - - describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-updated-connection", describe_response) - - get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret-after-update", get_secret_response) - - @markers.aws.validated - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_create_connection_name_validation(self, aws_client, snapshot, connection_name): - invalid_name = "Invalid Name With Spaces!" - - with pytest.raises(ClientError) as e: - aws_client.events.create_connection( - Name=invalid_name, - AuthorizationType="API_KEY", - AuthParameters={ - "ApiKeyAuthParameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - "InvocationHttpParameters": {}, - }, - ) - snapshot.match("create-connection-invalid-name-error", e.value.response) - - @markers.aws.validated - @pytest.mark.parametrize( - "auth_params", API_DESTINATION_AUTH_PARAMS, ids=["basic", "api-key", "oauth"] - ) - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_connection_secrets( - self, aws_client, snapshot, create_connection, connection_name, auth_params - ): - response = create_connection( - auth_params["AuthorizationType"], - auth_params["AuthParameters"], - ) - snapshot.match("create-connection-auth", response) - - describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection-auth", describe_response) - - secret_id = describe_response["SecretArn"] - secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") - snapshot.add_transformer( - snapshot.transform.regex(secret_uuid, ""), priority=-1 - ) - snapshot.add_transformer( - snapshot.transform.regex(secret_suffix, ""), priority=-1 - ) - get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret", get_secret_response) - - -API_DESTINATION_AUTHS = [ - { - "type": "BASIC", - "key": "BasicAuthParameters", - "parameters": {"Username": "user", "Password": "pass"}, - }, - { - "type": "API_KEY", - "key": "ApiKeyAuthParameters", - "parameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - }, - { - "type": "OAUTH_CLIENT_CREDENTIALS", - "key": "OAuthParameters", - "parameters": { - "ClientParameters": {"ClientID": "id", "ClientSecret": "password"}, - "AuthorizationEndpoint": "https://example.com/oauth", - "HttpMethod": "POST", - "OAuthHttpParameters": { - "BodyParameters": [{"Key": "oauthbody", "Value": "value1", "IsValueSecret": False}], - "HeaderParameters": [ - {"Key": "oauthheader", "Value": "value2", "IsValueSecret": False} - ], - "QueryStringParameters": [ - {"Key": "oauthquery", "Value": "value3", "IsValueSecret": False} - ], - }, - }, - }, -] - - -class TestEventBridgeApiDestinations: - @pytest.fixture - def api_destination_snapshots(self, snapshot, destination_name): - """Common snapshot transformers for API destination tests.""" - return TransformerUtility.eventbridge_api_destination(snapshot, destination_name) - - @markers.aws.validated - @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) - @pytest.mark.skipif( - is_old_provider(), - reason="V1 provider does not support this feature", - ) - def test_api_destinations( - self, - aws_client, - api_destination_snapshots, - create_connection, - create_api_destination, - connection_name, - destination_name, - auth, - ): - connection_response = create_connection(auth) - connection_arn = connection_response["ConnectionArn"] - - response = create_api_destination( - ConnectionArn=connection_arn, - HttpMethod="POST", - InvocationEndpoint="https://example.com/api", - Description="Test API destination", - ) - api_destination_snapshots.match("create-api-destination", response) - - describe_response = aws_client.events.describe_api_destination(Name=destination_name) - api_destination_snapshots.match("describe-api-destination", describe_response) - - list_response = aws_client.events.list_api_destinations(NamePrefix=destination_name) - api_destination_snapshots.match("list-api-destinations", list_response) - - update_response = aws_client.events.update_api_destination( - Name=destination_name, - ConnectionArn=connection_arn, - HttpMethod="PUT", - InvocationEndpoint="https://example.com/api/v2", - Description="Updated API destination", - ) - api_destination_snapshots.match("update-api-destination", update_response) - - describe_updated_response = aws_client.events.describe_api_destination( - Name=destination_name - ) - api_destination_snapshots.match( - "describe-updated-api-destination", describe_updated_response - ) - - delete_response = aws_client.events.delete_api_destination(Name=destination_name) - api_destination_snapshots.match("delete-api-destination", delete_response) - - with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc_info: - aws_client.events.describe_api_destination(Name=destination_name) - api_destination_snapshots.match( - "describe-api-destination-not-found-error", exc_info.value.response - ) - - @markers.aws.validated - @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") - def test_create_api_destination_invalid_parameters( - self, aws_client, api_destination_snapshots, connection_name, destination_name - ): - with pytest.raises(ClientError) as e: - aws_client.events.create_api_destination( - Name=destination_name, - ConnectionArn="invalid-connection-arn", - HttpMethod="INVALID_METHOD", - InvocationEndpoint="invalid-endpoint", - ) - api_destination_snapshots.match( - "create-api-destination-invalid-parameters-error", e.value.response - ) - - @markers.aws.validated - @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") - def test_create_api_destination_name_validation( - self, aws_client, api_destination_snapshots, create_connection, connection_name - ): - invalid_name = "Invalid Name With Spaces!" - - connection_response = create_connection(API_DESTINATION_AUTHS[0]) - connection_arn = connection_response["ConnectionArn"] - - with pytest.raises(ClientError) as e: - aws_client.events.create_api_destination( - Name=invalid_name, - ConnectionArn=connection_arn, - HttpMethod="POST", - InvocationEndpoint="https://example.com/api", - ) - api_destination_snapshots.match( - "create-api-destination-invalid-name-error", e.value.response - ) From 5abc0d2278dd140ca44cf2f2c04d0c7b22ef4271 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Fri, 6 Dec 2024 18:08:48 +0100 Subject: [PATCH 02/10] feat: move put event to api destination to target test file --- .../services/events/test_events_targets.py | 339 +++++++++++++----- 1 file changed, 254 insertions(+), 85 deletions(-) diff --git a/tests/aws/services/events/test_events_targets.py b/tests/aws/services/events/test_events_targets.py index 8839299ed6357..113d85be1894d 100644 --- a/tests/aws/services/events/test_events_targets.py +++ b/tests/aws/services/events/test_events_targets.py @@ -2,22 +2,26 @@ Tests are separated in different classes for each target service. Classes are ordered alphabetically.""" +import base64 import json import time import aws_cdk as cdk import pytest +from pytest_httpserver import HTTPServer +from werkzeug import Request, Response from localstack import config from localstack.aws.api.lambda_ import Runtime from localstack.testing.aws.util import is_aws_cloud from localstack.testing.pytest import markers from localstack.utils.aws import arns -from localstack.utils.strings import short_uid -from localstack.utils.sync import retry +from localstack.utils.strings import short_uid, to_str +from localstack.utils.sync import poll_condition, retry from localstack.utils.testutil import check_expected_lambda_log_events_length from tests.aws.scenario.kinesis_firehose.conftest import get_all_expected_messages_from_s3 from tests.aws.services.events.helper_functions import is_old_provider, sqs_collect_messages +from tests.aws.services.events.test_api_destinations_and_connection import API_DESTINATION_AUTHS from tests.aws.services.events.test_events import EVENT_DETAIL, TEST_EVENT_PATTERN from tests.aws.services.firehose.helper_functions import get_firehose_iam_documents from tests.aws.services.kinesis.helper_functions import get_shard_iterator @@ -26,7 +30,6 @@ TEST_LAMBDA_PYTHON_ECHO, ) - # TODO: # These tests should go into LocalStack Pro: # - AppSync (pro) @@ -34,103 +37,170 @@ # - Container (pro) # - Redshift (pro) # - Sagemaker (pro) -class TestEventsTargetCloudWatchLogs: - @markers.aws.validated - def test_put_events_with_target_cloudwatch_logs( - self, - events_create_event_bus, - events_put_rule, - events_log_group, - aws_client, - snapshot, - cleanups, - ): - snapshot.add_transformers_list( - [ - snapshot.transform.key_value("EventId"), - snapshot.transform.key_value("RuleArn"), - snapshot.transform.key_value("EventBusArn"), - ] - ) - event_bus_name = f"test-bus-{short_uid()}" - event_bus_response = events_create_event_bus(Name=event_bus_name) - snapshot.match("event_bus_response", event_bus_response) - log_group = events_log_group() - log_group_name = log_group["log_group_name"] - log_group_arn = log_group["log_group_arn"] - - resource_policy = { - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "EventBridgePutLogEvents", - "Effect": "Allow", - "Principal": {"Service": "events.amazonaws.com"}, - "Action": ["logs:CreateLogStream", "logs:PutLogEvents"], - "Resource": f"{log_group_arn}:*", - } - ], - } - policy_name = f"EventBridgePolicy-{short_uid()}" - aws_client.logs.put_resource_policy( - policyName=policy_name, policyDocument=json.dumps(resource_policy) - ) +class TestEventTargetApiDestinations: + # TODO validate against AWS + @markers.aws.only_localstack + @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) + def test_put_events_to_target_api_destinations( + self, httpserver: HTTPServer, auth, aws_client, clean_up + ): + token = short_uid() + bearer = f"Bearer {token}" - if is_aws_cloud(): - # Wait for IAM role propagation in AWS cloud environment before proceeding - # This delay is necessary as IAM changes can take several seconds to propagate globally - time.sleep(10) + def _handler(_request: Request): + return Response( + json.dumps( + { + "access_token": token, + "token_type": "Bearer", + "expires_in": 86400, + } + ), + mimetype="application/json", + ) - rule_name = f"test-rule-{short_uid()}" - rule_response = events_put_rule( - Name=rule_name, - EventBusName=event_bus_name, - EventPattern=json.dumps(TEST_EVENT_PATTERN), + httpserver.expect_request("").respond_with_handler(_handler) + http_endpoint = httpserver.url_for("/") + + if auth.get("type") == "OAUTH_CLIENT_CREDENTIALS": + auth["parameters"]["AuthorizationEndpoint"] = http_endpoint + + connection_name = f"c-{short_uid()}" + connection_arn = aws_client.events.create_connection( + Name=connection_name, + AuthorizationType=auth.get("type"), + AuthParameters={ + auth.get("key"): auth.get("parameters"), + "InvocationHttpParameters": { + "BodyParameters": [ + { + "Key": "connection_body_param", + "Value": "value", + "IsValueSecret": False, + }, + ], + "HeaderParameters": [ + { + "Key": "connection-header-param", + "Value": "value", + "IsValueSecret": False, + }, + { + "Key": "overwritten-header", + "Value": "original", + "IsValueSecret": False, + }, + ], + "QueryStringParameters": [ + { + "Key": "connection_query_param", + "Value": "value", + "IsValueSecret": False, + }, + { + "Key": "overwritten_query", + "Value": "original", + "IsValueSecret": False, + }, + ], + }, + }, + )["ConnectionArn"] + + # create api destination + dest_name = f"d-{short_uid()}" + result = aws_client.events.create_api_destination( + Name=dest_name, + ConnectionArn=connection_arn, + InvocationEndpoint=http_endpoint, + HttpMethod="POST", ) - snapshot.match("rule_response", rule_response) + # create rule and target + rule_name = f"r-{short_uid()}" target_id = f"target-{short_uid()}" - put_targets_response = aws_client.events.put_targets( + pattern = json.dumps({"source": ["source-123"], "detail-type": ["type-123"]}) + aws_client.events.put_rule(Name=rule_name, EventPattern=pattern) + aws_client.events.put_targets( Rule=rule_name, - EventBusName=event_bus_name, Targets=[ { "Id": target_id, - "Arn": log_group_arn, + "Arn": result["ApiDestinationArn"], + "Input": '{"target_value":"value"}', + "HttpParameters": { + "PathParameterValues": ["target_path"], + "HeaderParameters": { + "target-header": "target_header_value", + "overwritten_header": "changed", + }, + "QueryStringParameters": { + "target_query": "t_query", + "overwritten_query": "changed", + }, + }, } ], ) - snapshot.match("put_targets_response", put_targets_response) - assert put_targets_response["FailedEntryCount"] == 0 - event_entry = { - "EventBusName": event_bus_name, - "Source": TEST_EVENT_PATTERN["source"][0], - "DetailType": TEST_EVENT_PATTERN["detail-type"][0], - "Detail": json.dumps(EVENT_DETAIL), - } - put_events_response = aws_client.events.put_events(Entries=[event_entry]) - snapshot.match("put_events_response", put_events_response) - assert put_events_response["FailedEntryCount"] == 0 - - def get_log_events(): - response = aws_client.logs.describe_log_streams(logGroupName=log_group_name) - log_streams = response.get("logStreams", []) - assert log_streams, "No log streams found" - - log_stream_name = log_streams[0]["logStreamName"] - events_response = aws_client.logs.get_log_events( - logGroupName=log_group_name, - logStreamName=log_stream_name, - ) - events = events_response.get("events", []) - assert events, "No log events found" - return events - - events = retry(get_log_events, retries=5, sleep=5) - snapshot.match("log_events", events) + entries = [ + { + "Source": "source-123", + "DetailType": "type-123", + "Detail": '{"i": 0}', + } + ] + aws_client.events.put_events(Entries=entries) + + # clean up + aws_client.events.delete_connection(Name=connection_name) + aws_client.events.delete_api_destination(Name=dest_name) + clean_up(rule_name=rule_name, target_ids=target_id) + + to_recv = 2 if auth["type"] == "OAUTH_CLIENT_CREDENTIALS" else 1 + poll_condition(lambda: len(httpserver.log) >= to_recv, timeout=5) + + event_request, _ = httpserver.log[-1] + event = event_request.get_json(force=True) + headers = event_request.headers + query_args = event_request.args + + # Connection data validation + assert event["connection_body_param"] == "value" + assert headers["Connection-Header-Param"] == "value" + assert query_args["connection_query_param"] == "value" + + # Target parameters validation + assert "/target_path" in event_request.path + assert event["target_value"] == "value" + assert headers["Target-Header"] == "target_header_value" + assert query_args["target_query"] == "t_query" + + # connection/target overwrite test + assert headers["Overwritten-Header"] == "original" + assert query_args["overwritten_query"] == "original" + + # Auth validation + match auth["type"]: + case "BASIC": + user_pass = to_str(base64.b64encode(b"user:pass")) + assert headers["Authorization"] == f"Basic {user_pass}" + case "API_KEY": + assert headers["Api"] == "apikey_secret" + + case "OAUTH_CLIENT_CREDENTIALS": + assert headers["Authorization"] == bearer + + oauth_request, _ = httpserver.log[0] + oauth_login = oauth_request.get_json(force=True) + # Oauth login validation + assert oauth_login["client_id"] == "id" + assert oauth_login["client_secret"] == "password" + assert oauth_login["oauthbody"] == "value1" + assert oauth_request.headers["oauthheader"] == "value2" + assert oauth_request.args["oauthquery"] == "value3" class TestEventsTargetApiGateway: @@ -387,6 +457,105 @@ def test_put_events_with_target_api_gateway( snapshot.match("lambda_logs", events) +class TestEventsTargetCloudWatchLogs: + @markers.aws.validated + def test_put_events_with_target_cloudwatch_logs( + self, + events_create_event_bus, + events_put_rule, + events_log_group, + aws_client, + snapshot, + cleanups, + ): + snapshot.add_transformers_list( + [ + snapshot.transform.key_value("EventId"), + snapshot.transform.key_value("RuleArn"), + snapshot.transform.key_value("EventBusArn"), + ] + ) + + event_bus_name = f"test-bus-{short_uid()}" + event_bus_response = events_create_event_bus(Name=event_bus_name) + snapshot.match("event_bus_response", event_bus_response) + + log_group = events_log_group() + log_group_name = log_group["log_group_name"] + log_group_arn = log_group["log_group_arn"] + + resource_policy = { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "EventBridgePutLogEvents", + "Effect": "Allow", + "Principal": {"Service": "events.amazonaws.com"}, + "Action": ["logs:CreateLogStream", "logs:PutLogEvents"], + "Resource": f"{log_group_arn}:*", + } + ], + } + policy_name = f"EventBridgePolicy-{short_uid()}" + aws_client.logs.put_resource_policy( + policyName=policy_name, policyDocument=json.dumps(resource_policy) + ) + + if is_aws_cloud(): + # Wait for IAM role propagation in AWS cloud environment before proceeding + # This delay is necessary as IAM changes can take several seconds to propagate globally + time.sleep(10) + + rule_name = f"test-rule-{short_uid()}" + rule_response = events_put_rule( + Name=rule_name, + EventBusName=event_bus_name, + EventPattern=json.dumps(TEST_EVENT_PATTERN), + ) + snapshot.match("rule_response", rule_response) + + target_id = f"target-{short_uid()}" + put_targets_response = aws_client.events.put_targets( + Rule=rule_name, + EventBusName=event_bus_name, + Targets=[ + { + "Id": target_id, + "Arn": log_group_arn, + } + ], + ) + snapshot.match("put_targets_response", put_targets_response) + assert put_targets_response["FailedEntryCount"] == 0 + + event_entry = { + "EventBusName": event_bus_name, + "Source": TEST_EVENT_PATTERN["source"][0], + "DetailType": TEST_EVENT_PATTERN["detail-type"][0], + "Detail": json.dumps(EVENT_DETAIL), + } + put_events_response = aws_client.events.put_events(Entries=[event_entry]) + snapshot.match("put_events_response", put_events_response) + assert put_events_response["FailedEntryCount"] == 0 + + def get_log_events(): + response = aws_client.logs.describe_log_streams(logGroupName=log_group_name) + log_streams = response.get("logStreams", []) + assert log_streams, "No log streams found" + + log_stream_name = log_streams[0]["logStreamName"] + events_response = aws_client.logs.get_log_events( + logGroupName=log_group_name, + logStreamName=log_stream_name, + ) + events = events_response.get("events", []) + assert events, "No log events found" + return events + + events = retry(get_log_events, retries=5, sleep=5) + snapshot.match("log_events", events) + + class TestEventsTargetEvents: # cross region and cross account event bus to event buss tests are in test_events_cross_account_region.py From 066ce1be4c5b40be68b2676bbdaec028a86665d9 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Fri, 6 Dec 2024 18:08:59 +0100 Subject: [PATCH 03/10] feat: update snapshots --- ..._destinations_and_connection.snapshot.json | 798 ++++++++ ...estinations_and_connection.validation.json | 53 + .../services/events/test_events.snapshot.json | 1820 +++++------------ .../events/test_events.validation.json | 163 +- 4 files changed, 1410 insertions(+), 1424 deletions(-) create mode 100644 tests/aws/services/events/test_api_destinations_and_connection.snapshot.json create mode 100644 tests/aws/services/events/test_api_destinations_and_connection.validation.json diff --git a/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json b/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json new file mode 100644 index 0000000000000..1da904d08bf1f --- /dev/null +++ b/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json @@ -0,0 +1,798 @@ +{ + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection": { + "recorded-date": "06-12-2024, 17:07:01", + "recorded-content": { + "create-connection": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection": { + "AuthParameters": { + "ApiKeyAuthParameters": { + "ApiKeyName": "ApiKey" + }, + "InvocationHttpParameters": {} + }, + "AuthorizationType": "API_KEY", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params0]": { + "recorded-date": "06-12-2024, 17:07:02", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "BasicAuthParameters": { + "Username": "user" + } + }, + "AuthorizationType": "BASIC", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params1]": { + "recorded-date": "06-12-2024, 17:07:02", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "ApiKeyAuthParameters": { + "ApiKeyName": "ApiKey" + } + }, + "AuthorizationType": "API_KEY", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params2]": { + "recorded-date": "06-12-2024, 17:07:03", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZING", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "OAuthParameters": { + "AuthorizationEndpoint": "https://example.com/oauth", + "ClientParameters": { + "ClientID": "client_id" + }, + "HttpMethod": "POST" + } + }, + "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZING", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_list_connections": { + "recorded-date": "06-12-2024, 17:07:04", + "recorded-content": { + "list-connections": { + "Connections": [ + { + "AuthorizationType": "BASIC", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_delete_connection": { + "recorded-date": "06-12-2024, 17:07:11", + "recorded-content": { + "create-connection-response": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "delete-connection": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "DELETING", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-deleted-connection": { + "Error": { + "Code": "ResourceNotFoundException", + "Message": "Failed to describe the connection(s). Connection '' does not exist." + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_invalid_parameters": { + "recorded-date": "06-12-2024, 17:07:12", + "recorded-content": { + "create-connection-invalid-auth-error": { + "Error": { + "Code": "ValidationException", + "Message": "1 validation error detected: Value 'INVALID_AUTH_TYPE' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_update_connection": { + "recorded-date": "06-12-2024, 17:07:14", + "recorded-content": { + "create-connection": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-created-connection": { + "AuthParameters": { + "BasicAuthParameters": { + "Username": "user" + }, + "InvocationHttpParameters": {} + }, + "AuthorizationType": "BASIC", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "connection-secret-before-update": { + "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", + "CreatedDate": "datetime", + "Name": "events!connection//", + "SecretString": { + "username": "user", + "password": "pass", + "invocation_http_parameters": {} + }, + "VersionId": "", + "VersionStages": [ + "AWSCURRENT" + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "update-connection": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-updated-connection": { + "AuthParameters": { + "BasicAuthParameters": { + "Username": "new_user" + }, + "InvocationHttpParameters": {} + }, + "AuthorizationType": "BASIC", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "connection-secret-after-update": { + "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", + "CreatedDate": "datetime", + "Name": "events!connection//", + "SecretString": { + "username": "new_user", + "password": "new_pass", + "invocation_http_parameters": {} + }, + "VersionId": "", + "VersionStages": [ + "AWSCURRENT" + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_name_validation": { + "recorded-date": "06-12-2024, 17:07:14", + "recorded-content": { + "create-connection-invalid-name-error": { + "Error": { + "Code": "ValidationException", + "Message": "1 validation error detected: Value 'Invalid Name With Spaces!' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[basic]": { + "recorded-date": "06-12-2024, 17:07:15", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "BasicAuthParameters": { + "Username": "user" + } + }, + "AuthorizationType": "BASIC", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "connection-secret": { + "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", + "CreatedDate": "datetime", + "Name": "events!connection//", + "SecretString": { + "username": "user", + "password": "pass" + }, + "VersionId": "", + "VersionStages": [ + "AWSCURRENT" + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[api-key]": { + "recorded-date": "06-12-2024, 17:07:16", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "ApiKeyAuthParameters": { + "ApiKeyName": "ApiKey" + } + }, + "AuthorizationType": "API_KEY", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZED", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "connection-secret": { + "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", + "CreatedDate": "datetime", + "Name": "events!connection//", + "SecretString": { + "api_key_name": "ApiKey", + "api_key_value": "secret" + }, + "VersionId": "", + "VersionStages": [ + "AWSCURRENT" + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[oauth]": { + "recorded-date": "06-12-2024, 17:07:17", + "recorded-content": { + "create-connection-auth": { + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZING", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-connection-auth": { + "AuthParameters": { + "OAuthParameters": { + "AuthorizationEndpoint": "https://example.com/oauth", + "ClientParameters": { + "ClientID": "client_id" + }, + "HttpMethod": "POST" + } + }, + "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", + "ConnectionArn": "arn::events::111111111111:connection//", + "ConnectionState": "AUTHORIZING", + "CreationTime": "datetime", + "LastAuthorizedTime": "datetime", + "LastModifiedTime": "datetime", + "Name": "", + "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "connection-secret": { + "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", + "CreatedDate": "datetime", + "Name": "events!connection//", + "SecretString": { + "client_id": "client_id", + "client_secret": "client_secret", + "authorization_endpoint": "https://example.com/oauth", + "http_method": "POST" + }, + "VersionId": "", + "VersionStages": [ + "AWSCURRENT" + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { + "recorded-date": "06-12-2024, 17:07:33", + "recorded-content": { + "create-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Test API destination", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "list-api-destinations": { + "ApiDestinations": [ + { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "update-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-updated-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Updated API destination", + "HttpMethod": "PUT", + "InvocationEndpoint": "https://example.com/api/v2", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "delete-api-destination": { + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination-not-found-error": { + "Error": { + "Code": "ResourceNotFoundException", + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { + "recorded-date": "06-12-2024, 17:07:35", + "recorded-content": { + "create-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Test API destination", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "list-api-destinations": { + "ApiDestinations": [ + { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "update-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-updated-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "ACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Updated API destination", + "HttpMethod": "PUT", + "InvocationEndpoint": "https://example.com/api/v2", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "delete-api-destination": { + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination-not-found-error": { + "Error": { + "Code": "ResourceNotFoundException", + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { + "recorded-date": "06-12-2024, 17:07:37", + "recorded-content": { + "create-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "INACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "INACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Test API destination", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "list-api-destinations": { + "ApiDestinations": [ + { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "INACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "HttpMethod": "POST", + "InvocationEndpoint": "https://example.com/api", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "" + } + ], + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "update-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "INACTIVE", + "CreationTime": "datetime", + "LastModifiedTime": "datetime", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-updated-api-destination": { + "ApiDestinationArn": "api-destination-arn", + "ApiDestinationState": "INACTIVE", + "ConnectionArn": "connection-arn", + "CreationTime": "datetime", + "Description": "Updated API destination", + "HttpMethod": "PUT", + "InvocationEndpoint": "https://example.com/api/v2", + "InvocationRateLimitPerSecond": 300, + "LastModifiedTime": "datetime", + "Name": "", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "delete-api-destination": { + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "describe-api-destination-not-found-error": { + "Error": { + "Code": "ResourceNotFoundException", + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { + "recorded-date": "06-12-2024, 17:07:37", + "recorded-content": { + "create-api-destination-invalid-parameters-error": { + "Error": { + "Code": "ValidationException", + "Message": "2 validation errors detected: Value 'invalid-connection-arn' at 'connectionArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:connection\\/[\\.\\-_A-Za-z0-9]+\\/[\\-A-Za-z0-9]+$; Value 'INVALID_METHOD' at 'httpMethod' failed to satisfy constraint: Member must satisfy enum value set: [HEAD, POST, PATCH, DELETE, PUT, GET, OPTIONS]" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { + "recorded-date": "06-12-2024, 17:07:39", + "recorded-content": { + "create-api-destination-invalid-name-error": { + "Error": { + "Code": "ValidationException", + "Message": "1 validation error detected: Value 'Invalid Name With Spaces!' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + } +} diff --git a/tests/aws/services/events/test_api_destinations_and_connection.validation.json b/tests/aws/services/events/test_api_destinations_and_connection.validation.json new file mode 100644 index 0000000000000..13172ff8e0dd5 --- /dev/null +++ b/tests/aws/services/events/test_api_destinations_and_connection.validation.json @@ -0,0 +1,53 @@ +{ + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[api-key]": { + "last_validated_date": "2024-12-06T17:07:16+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[basic]": { + "last_validated_date": "2024-12-06T17:07:15+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[oauth]": { + "last_validated_date": "2024-12-06T17:07:17+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection": { + "last_validated_date": "2024-12-06T17:07:01+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_invalid_parameters": { + "last_validated_date": "2024-12-06T17:07:12+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_name_validation": { + "last_validated_date": "2024-12-06T17:07:14+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params0]": { + "last_validated_date": "2024-12-06T17:07:01+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params1]": { + "last_validated_date": "2024-12-06T17:07:02+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params2]": { + "last_validated_date": "2024-12-06T17:07:03+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_delete_connection": { + "last_validated_date": "2024-12-06T17:07:10+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_list_connections": { + "last_validated_date": "2024-12-06T17:07:04+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_update_connection": { + "last_validated_date": "2024-12-06T17:07:14+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { + "last_validated_date": "2024-12-06T17:07:32+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { + "last_validated_date": "2024-12-06T17:07:35+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { + "last_validated_date": "2024-12-06T17:07:37+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { + "last_validated_date": "2024-12-06T17:07:37+00:00" + }, + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { + "last_validated_date": "2024-12-06T17:07:39+00:00" + } +} diff --git a/tests/aws/services/events/test_events.snapshot.json b/tests/aws/services/events/test_events.snapshot.json index 4b6964be9b41d..725f66fbca4a6 100644 --- a/tests/aws/services/events/test_events.snapshot.json +++ b/tests/aws/services/events/test_events.snapshot.json @@ -1,6 +1,6 @@ { "tests/aws/services/events/test_events.py::TestEvents::test_put_events_without_source": { - "recorded-date": "19-06-2024, 10:40:50", + "recorded-date": "06-12-2024, 16:53:14", "recorded-content": { "put-events": { "Entries": [ @@ -18,7 +18,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail": { - "recorded-date": "19-06-2024, 10:40:51", + "recorded-date": "06-12-2024, 16:53:14", "recorded-content": { "put-events": { "Entries": [ @@ -35,8 +35,113 @@ } } }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_with_too_big_detail": { + "recorded-date": "06-12-2024, 16:53:15", + "recorded-content": { + "put-events-too-big-detail-error": { + "Error": { + "Code": "ValidationException", + "Message": "Total size of the entries in the request is over the limit." + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail_type": { + "recorded-date": "06-12-2024, 16:53:15", + "recorded-content": { + "put-events": { + "Entries": [ + { + "ErrorCode": "InvalidArgument", + "ErrorMessage": "Parameter DetailType is not valid. Reason: DetailType is a required argument." + } + ], + "FailedEntryCount": 1, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[STRING]": { + "recorded-date": "06-12-2024, 16:53:15", + "recorded-content": { + "put-events": { + "Entries": [ + { + "ErrorCode": "MalformedDetail", + "ErrorMessage": "Detail is malformed." + } + ], + "FailedEntryCount": 1, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[ARRAY]": { + "recorded-date": "06-12-2024, 16:53:16", + "recorded-content": { + "put-events": { + "Entries": [ + { + "ErrorCode": "MalformedDetail", + "ErrorMessage": "Detail is malformed." + } + ], + "FailedEntryCount": 1, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[MALFORMED_JSON]": { + "recorded-date": "06-12-2024, 16:53:16", + "recorded-content": { + "put-events": { + "Entries": [ + { + "ErrorCode": "MalformedDetail", + "ErrorMessage": "Detail is malformed." + } + ], + "FailedEntryCount": 1, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[SERIALIZED_STRING]": { + "recorded-date": "06-12-2024, 16:53:16", + "recorded-content": { + "put-events": { + "Entries": [ + { + "ErrorCode": "MalformedDetail", + "ErrorMessage": "Detail is malformed." + } + ], + "FailedEntryCount": 1, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_time": { - "recorded-date": "27-08-2024, 10:02:33", + "recorded-date": "06-12-2024, 16:53:19", "recorded-content": { "messages": [ { @@ -97,7 +202,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[custom]": { - "recorded-date": "19-06-2024, 10:40:54", + "recorded-date": "06-12-2024, 16:53:20", "recorded-content": { "put-events-exceed-limit-error": { "Error": { @@ -112,7 +217,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[default]": { - "recorded-date": "19-06-2024, 10:40:55", + "recorded-date": "06-12-2024, 16:53:20", "recorded-content": { "put-events-exceed-limit-error": { "Error": { @@ -126,11 +231,104 @@ } } }, + "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { + "recorded-date": "06-12-2024, 16:53:21", + "recorded-content": { + "create_connection_exc": { + "Error": { + "Code": "ValidationException", + "Message": "3 validation errors detected: Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must have length less than or equal to 64; Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+; Value 'INVALID' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" + }, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 400 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { + "recorded-date": "06-12-2024, 17:04:16", + "recorded-content": { + "put-events-response": { + "Entries": [ + { + "EventId": "4edeb1d7-bae4-0302-b6b6-a9e8b7cd38f0" + } + ], + "FailedEntryCount": 0, + "ResponseMetadata": { + "HTTPHeaders": { + "content-length": "85", + "content-type": "application/x-amz-json-1.1", + "date": "Fri, 06 Dec 2024 17:01:33 GMT", + "x-amzn-requestid": "f67cc244-96c2-4a2c-849a-451cb1e6686f" + }, + "HTTPStatusCode": 200, + "RequestId": "f67cc244-96c2-4a2c-849a-451cb1e6686f", + "RetryAttempts": 0 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_target_delivery_failure": { + "recorded-date": "06-12-2024, 16:56:08", + "recorded-content": { + "put-events-response": { + "Entries": [ + { + "EventId": "" + } + ], + "FailedEntryCount": 0, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + } + } + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_time_field": { + "recorded-date": "06-12-2024, 17:04:30", + "recorded-content": { + "put-events": { + "Entries": [ + { + "EventId": "" + } + ], + "FailedEntryCount": 0, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "sqs-messages": [ + { + "MessageId": "", + "ReceiptHandle": "", + "MD5OfBody": "m-d5-of-body", + "Body": { + "version": "0", + "id": "", + "detail-type": "test-detail-type", + "source": "test-source", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": { + "message": "test message" + } + } + } + ] + } + }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions0]": { - "recorded-date": "19-06-2024, 10:54:07", + "recorded-date": "06-12-2024, 16:56:15", "recorded-content": { "create-custom-event-bus-us-east-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -139,10 +337,10 @@ "list-event-buses-after-create-us-east-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -151,10 +349,10 @@ } }, "describe-custom-event-bus-us-east-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -176,10 +374,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions1]": { - "recorded-date": "19-06-2024, 10:54:09", + "recorded-date": "06-12-2024, 16:56:17", "recorded-content": { "create-custom-event-bus-us-east-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -188,10 +386,10 @@ "list-event-buses-after-create-us-east-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -200,17 +398,17 @@ } }, "describe-custom-event-bus-us-east-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "create-custom-event-bus-us-west-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -219,10 +417,10 @@ "list-event-buses-after-create-us-west-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -231,17 +429,17 @@ } }, "describe-custom-event-bus-us-west-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "create-custom-event-bus-eu-central-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -250,10 +448,10 @@ "list-event-buses-after-create-eu-central-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -262,10 +460,10 @@ } }, "describe-custom-event-bus-eu-central-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -313,34 +511,34 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_multiple_event_buses_same_name": { - "recorded-date": "19-06-2024, 10:41:05", + "recorded-date": "06-12-2024, 16:56:19", "recorded-content": { "create-multiple-event-buses-same-name": " already exists.') tblen=4>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_describe_delete_not_existing_event_bus": { - "recorded-date": "19-06-2024, 10:41:07", + "recorded-date": "06-12-2024, 16:56:19", "recorded-content": { "describe-not-existing-event-bus-error": " does not exist.') tblen=3>", "delete-not-existing-event-bus": " does not exist.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_delete_default_event_bus": { - "recorded-date": "19-06-2024, 10:41:07", + "recorded-date": "06-12-2024, 16:56:19", "recorded-content": { "delete-default-event-bus-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_prefix": { - "recorded-date": "19-06-2024, 10:49:27", + "recorded-date": "06-12-2024, 16:56:21", "recorded-content": { "list-event-buses-prefix-complete-name": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -351,10 +549,10 @@ "list-event-buses-prefix": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -365,27 +563,27 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_limit": { - "recorded-date": "19-06-2024, 10:50:45", + "recorded-date": "06-12-2024, 16:56:25", "recorded-content": { "list-event-buses-limit": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/-0", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-0" + "Name": "" }, { - "Arn": "arn::events::111111111111:event-bus/-1", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-1" + "Name": "" }, { - "Arn": "arn::events::111111111111:event-bus/-2", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-2" + "Name": "" } ], "NextToken": "", @@ -397,22 +595,22 @@ "list-event-buses-limit-next-token": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/-3", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-3" + "Name": "" }, { - "Arn": "arn::events::111111111111:event-bus/-4", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-4" + "Name": "" }, { - "Arn": "arn::events::111111111111:event-bus/-5", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "-5" + "Name": "" } ], "ResponseMetadata": { @@ -423,7 +621,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[custom]": { - "recorded-date": "19-06-2024, 10:41:14", + "recorded-date": "06-12-2024, 16:56:28", "recorded-content": { "put-permission": { "ResponseMetadata": { @@ -432,10 +630,10 @@ } }, "describe-event-bus-put-permission-multiple-principals": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -443,28 +641,28 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -474,10 +672,10 @@ } }, "describe-event-bus-put-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -485,35 +683,35 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": "*", "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -529,10 +727,10 @@ } }, "describe-event-bus-put-permission-policy": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -555,7 +753,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[default]": { - "recorded-date": "19-06-2024, 10:41:15", + "recorded-date": "06-12-2024, 16:56:29", "recorded-content": { "put-permission": { "ResponseMetadata": { @@ -564,10 +762,10 @@ } }, "describe-event-bus-put-permission-multiple-principals": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -575,28 +773,28 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -606,10 +804,10 @@ } }, "describe-event-bus-put-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -617,35 +815,35 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": "*", "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -661,10 +859,10 @@ } }, "describe-event-bus-put-permission-policy": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -687,13 +885,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission_non_existing_event_bus": { - "recorded-date": "19-06-2024, 10:41:15", + "recorded-date": "06-12-2024, 16:56:29", "recorded-content": { "remove-permission-non-existing-sid-error": " does not exist.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[custom]": { - "recorded-date": "19-06-2024, 10:41:17", + "recorded-date": "06-12-2024, 16:56:31", "recorded-content": { "remove-permission": { "ResponseMetadata": { @@ -702,10 +900,10 @@ } }, "describe-event-bus-remove-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -713,10 +911,10 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -732,10 +930,10 @@ } }, "describe-event-bus-remove-permission-all": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -744,7 +942,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[default]": { - "recorded-date": "19-06-2024, 10:41:18", + "recorded-date": "06-12-2024, 16:56:32", "recorded-content": { "remove-permission": { "ResponseMetadata": { @@ -753,10 +951,10 @@ } }, "describe-event-bus-remove-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -764,10 +962,10 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::root" + "AWS": "arn::iam:::" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -783,10 +981,10 @@ } }, "describe-event-bus-remove-permission-all": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -795,59 +993,146 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-custom]": { - "recorded-date": "19-06-2024, 10:41:18", + "recorded-date": "06-12-2024, 16:56:33", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-default]": { - "recorded-date": "19-06-2024, 10:41:19", + "recorded-date": "06-12-2024, 16:56:34", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-custom]": { - "recorded-date": "19-06-2024, 10:41:20", + "recorded-date": "06-12-2024, 16:56:35", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-default]": { - "recorded-date": "19-06-2024, 10:41:21", + "recorded-date": "06-12-2024, 16:56:36", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, - "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_to_default_eventbus_for_custom_eventbus": { - "recorded-date": "19-06-2024, 10:41:47", + "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[standard]": { + "recorded-date": "06-12-2024, 16:56:51", "recorded-content": { - "create-custom-event-bus": { - "EventBusArn": "arn::events::111111111111:event-bus/", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "create-rule-1": { - "RuleArn": "arn::events::111111111111:rule/", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 + "messages": [ + { + "MessageId": "", + "ReceiptHandle": "receipt-handle", + "MD5OfBody": "m-d5-of-body", + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": { + "command": "update-account", + "payload": { + "acc_id": "0a787ecb-4015", + "sf_id": "baz" + } + } + } } - }, - "create-rule-2": { - "RuleArn": "arn::events::111111111111:rule//", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 + ] + } + }, + "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[domain]": { + "recorded-date": "06-12-2024, 16:57:06", + "recorded-content": { + "messages": [ + { + "MessageId": "", + "ReceiptHandle": "receipt-handle", + "MD5OfBody": "m-d5-of-body", + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": { + "command": "update-account", + "payload": { + "acc_id": "0a787ecb-4015", + "sf_id": "baz" + } + } + } } - }, - "put-target-1": { - "FailedEntries": [], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 + ] + } + }, + "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[path]": { + "recorded-date": "06-12-2024, 16:57:20", + "recorded-content": { + "messages": [ + { + "MessageId": "", + "ReceiptHandle": "receipt-handle", + "MD5OfBody": "m-d5-of-body", + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": { + "command": "update-account", + "payload": { + "acc_id": "0a787ecb-4015", + "sf_id": "baz" + } + } + } + } + ] + } + }, + "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_to_default_eventbus_for_custom_eventbus": { + "recorded-date": "06-12-2024, 17:01:21", + "recorded-content": { + "create-custom-event-bus": { + "EventBusArn": "arn::events::111111111111:event-bus/", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "create-rule-1": { + "RuleArn": "arn::events::111111111111:rule/", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "create-rule-2": { + "RuleArn": "arn::events::111111111111:rule//", + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 + } + }, + "put-target-1": { + "FailedEntries": [], + "FailedEntryCount": 0, + "ResponseMetadata": { + "HTTPHeaders": {}, + "HTTPStatusCode": 200 } }, "put-target-2": { @@ -898,7 +1183,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_nonexistent_event_bus": { - "recorded-date": "19-06-2024, 10:45:41", + "recorded-date": "06-12-2024, 16:59:39", "recorded-content": { "put-events": { "Entries": [ @@ -948,10 +1233,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[custom]": { - "recorded-date": "19-06-2024, 10:42:07", + "recorded-date": "06-12-2024, 16:59:41", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -960,7 +1245,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -975,7 +1260,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -985,7 +1270,7 @@ } }, "describe-rule": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1001,7 +1286,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1024,10 +1309,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[default]": { - "recorded-date": "19-06-2024, 10:42:08", + "recorded-date": "06-12-2024, 16:59:42", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule/", + "RuleArn": "arn::events::111111111111:rule/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1036,7 +1321,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "EventBusName": "default", "EventPattern": { "source": [ @@ -1051,7 +1336,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -1061,7 +1346,7 @@ } }, "describe-rule": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1077,7 +1362,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1100,17 +1385,17 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_multiple_rules_with_same_name": { - "recorded-date": "19-06-2024, 10:42:09", + "recorded-date": "06-12-2024, 16:59:44", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "re-put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1119,7 +1404,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1134,7 +1419,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -1146,13 +1431,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_list_rule_with_limit": { - "recorded-date": "19-06-2024, 10:42:12", + "recorded-date": "06-12-2024, 16:59:48", "recorded-content": { "list-rules-limit": { "NextToken": "", "Rules": [ { - "Arn": "arn::events::111111111111:rule//-0", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1167,11 +1452,11 @@ ] } }, - "Name": "-0", + "Name": "", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//-1", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1186,11 +1471,11 @@ ] } }, - "Name": "-1", + "Name": "", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//-2", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1205,7 +1490,7 @@ ] } }, - "Name": "-2", + "Name": "", "State": "ENABLED" } ], @@ -1217,7 +1502,7 @@ "list-rules-limit-next-token": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//-3", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1232,11 +1517,11 @@ ] } }, - "Name": "-3", + "Name": "", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//-4", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1251,11 +1536,11 @@ ] } }, - "Name": "-4", + "Name": "", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//-5", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1270,7 +1555,7 @@ ] } }, - "Name": "-5", + "Name": "", "State": "ENABLED" } ], @@ -1282,13 +1567,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_describe_nonexistent_rule": { - "recorded-date": "19-06-2024, 10:42:14", + "recorded-date": "06-12-2024, 16:59:48", "recorded-content": { "describe-not-existing-rule-error": " does not exist on EventBus default.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[custom]": { - "recorded-date": "19-06-2024, 10:42:15", + "recorded-date": "06-12-2024, 16:59:50", "recorded-content": { "disable-rule": { "ResponseMetadata": { @@ -1297,7 +1582,7 @@ } }, "describe-rule-disabled": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1313,7 +1598,7 @@ ] } }, - "Name": "", + "Name": "", "State": "DISABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1327,7 +1612,7 @@ } }, "describe-rule-enabled": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1343,7 +1628,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1353,7 +1638,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[default]": { - "recorded-date": "19-06-2024, 10:42:17", + "recorded-date": "06-12-2024, 16:59:51", "recorded-content": { "disable-rule": { "ResponseMetadata": { @@ -1362,7 +1647,7 @@ } }, "describe-rule-disabled": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1378,7 +1663,7 @@ ] } }, - "Name": "", + "Name": "", "State": "DISABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1392,7 +1677,7 @@ } }, "describe-rule-enabled": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1408,7 +1693,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1418,18 +1703,18 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_delete_rule_with_targets": { - "recorded-date": "19-06-2024, 10:42:18", + "recorded-date": "06-12-2024, 16:59:53", "recorded-content": { "delete-rule-with-targets-error": "" } }, "tests/aws/services/events/test_events.py::TestEventRule::test_update_rule_with_targets": { - "recorded-date": "19-06-2024, 10:42:20", + "recorded-date": "06-12-2024, 16:59:54", "recorded-content": { "list-targets": { "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "" } ], @@ -1439,7 +1724,7 @@ } }, "update-rule": { - "RuleArn": "arn::events::111111111111:rule/", + "RuleArn": "arn::events::111111111111:rule/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1448,7 +1733,7 @@ "list-targets-after-update": { "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "" } ], @@ -1460,7 +1745,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_with_values_in_array": { - "recorded-date": "19-06-2024, 10:42:28", + "recorded-date": "06-12-2024, 17:00:03", "recorded-content": { "messages": [ { @@ -1496,7 +1781,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_nested": { - "recorded-date": "19-06-2024, 10:42:40", + "recorded-date": "06-12-2024, 17:00:15", "recorded-content": { "messages": [ { @@ -1515,7 +1800,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[custom]": { - "recorded-date": "19-06-2024, 10:42:42", + "recorded-date": "06-12-2024, 17:00:18", "recorded-content": { "put-target": { "FailedEntries": [], @@ -1528,7 +1813,7 @@ "list-targets": { "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "" } ], @@ -1555,7 +1840,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[default]": { - "recorded-date": "19-06-2024, 10:42:44", + "recorded-date": "06-12-2024, 17:00:19", "recorded-content": { "put-target": { "FailedEntries": [], @@ -1568,7 +1853,7 @@ "list-targets": { "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "" } ], @@ -1595,27 +1880,27 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_add_exceed_fife_targets_per_rule": { - "recorded-date": "19-06-2024, 10:42:45", + "recorded-date": "06-12-2024, 17:00:20", "recorded-content": { "put-targets-client-error": "" } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_list_target_by_rule_limit": { - "recorded-date": "19-06-2024, 10:42:47", + "recorded-date": "06-12-2024, 17:00:22", "recorded-content": { "list-targets-limit": { "NextToken": "", "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "0" }, { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "1" }, { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "2" } ], @@ -1627,11 +1912,11 @@ "list-targets-limit-next-token": { "Targets": [ { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "3" }, { - "Arn": "", + "Arn": "arn::sqs::111111111111:", "Id": "4" } ], @@ -1643,7 +1928,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_target_id_validation": { - "recorded-date": "19-06-2024, 10:42:49", + "recorded-date": "06-12-2024, 17:00:24", "recorded-content": { "put-targets-invalid-id-error": { "Error": { @@ -1667,833 +1952,38 @@ } } }, - "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[standard]": { - "recorded-date": "20-06-2024, 08:47:59", - "recorded-content": { - "messages": [ - { - "MessageId": "", - "ReceiptHandle": "receipt-handle", - "MD5OfBody": "m-d5-of-body", - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": { - "command": "update-account", - "payload": { - "acc_id": "0a787ecb-4015", - "sf_id": "baz" - } - } - } - } - ] - } - }, - "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[domain]": { - "recorded-date": "20-06-2024, 08:48:13", - "recorded-content": { - "messages": [ - { - "MessageId": "", - "ReceiptHandle": "receipt-handle", - "MD5OfBody": "m-d5-of-body", - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": { - "command": "update-account", - "payload": { - "acc_id": "0a787ecb-4015", - "sf_id": "baz" - } - } - } - } - ] - } - }, - "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[path]": { - "recorded-date": "20-06-2024, 08:48:28", - "recorded-content": { - "messages": [ - { - "MessageId": "", - "ReceiptHandle": "receipt-handle", - "MD5OfBody": "m-d5-of-body", - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": { - "command": "update-account", - "payload": { - "acc_id": "0a787ecb-4015", - "sf_id": "baz" - } - } - } - } - ] - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_with_too_big_detail": { - "recorded-date": "18-10-2024, 07:36:18", - "recorded-content": { - "put-events-too-big-detail-error": { - "Error": { - "Code": "ValidationException", - "Message": "Total size of the entries in the request is over the limit."}, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { - "recorded-date": "14-11-2024, 20:29:49", - "recorded-content": { - "create_connection_exc": { - "Error": { - "Code": "ValidationException", - "Message": "3 validation errors detected: Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+; Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must have length less than or equal to 64; Value 'INVALID' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection": { - "recorded-date": "21-11-2024, 14:49:50", - "recorded-content": { - "create-connection": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection": { - "AuthParameters": { - "ApiKeyAuthParameters": { - "ApiKeyName": "ApiKey" - }, - "InvocationHttpParameters": {} - }, - "AuthorizationType": "API_KEY", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params0]": { - "recorded-date": "21-11-2024, 14:49:51", - "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection-auth": { - "AuthParameters": { - "BasicAuthParameters": { - "Username": "user" - } - }, - "AuthorizationType": "BASIC", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params1]": { - "recorded-date": "21-11-2024, 14:49:51", + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { + "recorded-date": "20-11-2024, 12:32:18", "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection-auth": { - "AuthParameters": { - "ApiKeyAuthParameters": { - "ApiKeyName": "ApiKey" + "put-events-response": { + "Entries": [ + { + "EventId": "event-id" } - }, - "AuthorizationType": "API_KEY", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params2]": { - "recorded-date": "21-11-2024, 14:49:51", - "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZING", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", + ], + "FailedEntryCount": 0, "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, - "describe-connection-auth": { - "AuthParameters": { - "OAuthParameters": { - "AuthorizationEndpoint": "https://example.com/oauth", - "ClientParameters": { - "ClientID": "client_id" + "sqs-messages": { + "queue1_messages": [ + { + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": "detail" }, - "HttpMethod": "POST" - } - }, - "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZING", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_list_connections": { - "recorded-date": "21-11-2024, 14:49:52", - "recorded-content": { - "list-connections": { - "Connections": [ - { - "AuthorizationType": "BASIC", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "" - } - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_invalid_parameters": { - "recorded-date": "21-11-2024, 14:49:53", - "recorded-content": { - "create-connection-invalid-auth-error": { - "Error": { - "Code": "ValidationException", - "Message": "1 validation error detected: Value 'INVALID_AUTH_TYPE' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_update_connection": { - "recorded-date": "21-11-2024, 15:39:32", - "recorded-content": { - "create-connection": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-created-connection": { - "AuthParameters": { - "BasicAuthParameters": { - "Username": "user" - }, - "InvocationHttpParameters": {} - }, - "AuthorizationType": "BASIC", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "connection-secret-before-update": { - "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", - "CreatedDate": "datetime", - "Name": "events!connection//", - "SecretString": { - "username": "user", - "password": "pass", - "invocation_http_parameters": {} - }, - "VersionId": "", - "VersionStages": [ - "AWSCURRENT" - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "update-connection": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-updated-connection": { - "AuthParameters": { - "BasicAuthParameters": { - "Username": "new_user" - }, - "InvocationHttpParameters": {} - }, - "AuthorizationType": "BASIC", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "connection-secret-after-update": { - "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", - "CreatedDate": "datetime", - "Name": "events!connection//", - "SecretString": { - "username": "new_user", - "password": "new_pass", - "invocation_http_parameters": {} - }, - "VersionId": "", - "VersionStages": [ - "AWSCURRENT" - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_name_validation": { - "recorded-date": "21-11-2024, 14:49:54", - "recorded-content": { - "create-connection-invalid-name-error": { - "Error": { - "Code": "ValidationException", - "Message": "1 validation error detected: Value 'Invalid Name With Spaces!' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+" - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_delete_connection": { - "recorded-date": "21-11-2024, 15:47:45", - "recorded-content": { - "create-connection-response": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "delete-connection": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "DELETING", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-deleted-connection": { - "Error": { - "Code": "ResourceNotFoundException", - "Message": "Failed to describe the connection(s). Connection '' does not exist." - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_create_endpoint": { - "recorded-date": "16-11-2024, 13:01:35", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_list_endpoints": { - "recorded-date": "16-11-2024, 13:01:36", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_delete_endpoint": { - "recorded-date": "16-11-2024, 12:56:52", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_update_endpoint": { - "recorded-date": "16-11-2024, 12:56:52", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_create_endpoint_invalid_parameters": { - "recorded-date": "16-11-2024, 12:56:52", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeEndpoints::test_create_endpoint_name_validation": { - "recorded-date": "16-11-2024, 12:56:52", - "recorded-content": {} - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { - "recorded-date": "16-11-2024, 13:44:03", - "recorded-content": { - "create-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Test API destination", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "list-api-destinations": { - "ApiDestinations": [ - { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "" - } - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "update-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-updated-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Updated API destination", - "HttpMethod": "PUT", - "InvocationEndpoint": "https://example.com/api/v2", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "delete-api-destination": { - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination-not-found-error": { - "Error": { - "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { - "recorded-date": "16-11-2024, 13:44:04", - "recorded-content": { - "create-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Test API destination", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "list-api-destinations": { - "ApiDestinations": [ - { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "" - } - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "update-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-updated-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "ACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Updated API destination", - "HttpMethod": "PUT", - "InvocationEndpoint": "https://example.com/api/v2", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "delete-api-destination": { - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination-not-found-error": { - "Error": { - "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { - "recorded-date": "16-11-2024, 13:44:07", - "recorded-content": { - "create-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "INACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "INACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Test API destination", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "list-api-destinations": { - "ApiDestinations": [ - { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "INACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "HttpMethod": "POST", - "InvocationEndpoint": "https://example.com/api", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "" - } - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "update-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "INACTIVE", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-updated-api-destination": { - "ApiDestinationArn": "api-destination-arn", - "ApiDestinationState": "INACTIVE", - "ConnectionArn": "connection-arn", - "CreationTime": "datetime", - "Description": "Updated API destination", - "HttpMethod": "PUT", - "InvocationEndpoint": "https://example.com/api/v2", - "InvocationRateLimitPerSecond": 300, - "LastModifiedTime": "datetime", - "Name": "", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "delete-api-destination": { - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-api-destination-not-found-error": { - "Error": { - "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { - "recorded-date": "16-11-2024, 13:44:07", - "recorded-content": { - "create-api-destination-invalid-parameters-error": { - "Error": { - "Code": "ValidationException", - "Message": "2 validation errors detected: Value 'invalid-connection-arn' at 'connectionArn' failed to satisfy constraint: Member must satisfy regular expression pattern: ^arn:aws([a-z]|\\-)*:events:([a-z]|\\d|\\-)*:([0-9]{12})?:connection\\/[\\.\\-_A-Za-z0-9]+\\/[\\-A-Za-z0-9]+$; Value 'INVALID_METHOD' at 'httpMethod' failed to satisfy constraint: Member must satisfy enum value set: [HEAD, POST, PATCH, DELETE, PUT, GET, OPTIONS]" - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { - "recorded-date": "16-11-2024, 13:44:08", - "recorded-content": { - "create-api-destination-invalid-name-error": { - "Error": { - "Code": "ValidationException", - "Message": "1 validation error detected: Value 'Invalid Name With Spaces!' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+" - }, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 400 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail_type": { - "recorded-date": "14-11-2024, 22:43:09", - "recorded-content": { - "put-events": { - "Entries": [ - { - "ErrorCode": "InvalidArgument", - "ErrorMessage": "Parameter DetailType is not valid. Reason: DetailType is a required argument." - } - ], - "FailedEntryCount": 1, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { - "recorded-date": "20-11-2024, 12:32:18", - "recorded-content": { - "put-events-response": { - "Entries": [ - { - "EventId": "event-id" - } - ], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "sqs-messages": { - "queue1_messages": [ - { - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": "detail" - }, - "MD5OfBody": "", - "MessageId": "", - "ReceiptHandle": "" + "MD5OfBody": "", + "MessageId": "", + "ReceiptHandle": "" } ], "queue2_messages": [ @@ -2516,307 +2006,5 @@ ] } } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_iam_permission_failure": { - "recorded-date": "20-11-2024, 12:32:10", - "recorded-content": { - "put-events-response": { - "Entries": [ - { - "EventId": "" - } - ], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_target_delivery_failure": { - "recorded-date": "20-11-2024, 17:19:19", - "recorded-content": { - "put-events-response": { - "Entries": [ - { - "EventId": "" - } - ], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[basic]": { - "recorded-date": "21-11-2024, 15:16:35", - "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection-auth": { - "AuthParameters": { - "BasicAuthParameters": { - "Username": "user" - } - }, - "AuthorizationType": "BASIC", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "connection-secret": { - "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", - "CreatedDate": "datetime", - "Name": "events!connection//", - "SecretString": { - "username": "user", - "password": "pass" - }, - "VersionId": "", - "VersionStages": [ - "AWSCURRENT" - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[api-key]": { - "recorded-date": "21-11-2024, 15:16:35", - "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection-auth": { - "AuthParameters": { - "ApiKeyAuthParameters": { - "ApiKeyName": "ApiKey" - } - }, - "AuthorizationType": "API_KEY", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZED", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "connection-secret": { - "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", - "CreatedDate": "datetime", - "Name": "events!connection//", - "SecretString": { - "api_key_name": "ApiKey", - "api_key_value": "secret" - }, - "VersionId": "", - "VersionStages": [ - "AWSCURRENT" - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[oauth]": { - "recorded-date": "21-11-2024, 15:16:36", - "recorded-content": { - "create-connection-auth": { - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZING", - "CreationTime": "datetime", - "LastModifiedTime": "datetime", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "describe-connection-auth": { - "AuthParameters": { - "OAuthParameters": { - "AuthorizationEndpoint": "https://example.com/oauth", - "ClientParameters": { - "ClientID": "client_id" - }, - "HttpMethod": "POST" - } - }, - "AuthorizationType": "OAUTH_CLIENT_CREDENTIALS", - "ConnectionArn": "arn::events::111111111111:connection//", - "ConnectionState": "AUTHORIZING", - "CreationTime": "datetime", - "LastAuthorizedTime": "datetime", - "LastModifiedTime": "datetime", - "Name": "", - "SecretArn": "arn::secretsmanager::111111111111:secret:events!connection//-", - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "connection-secret": { - "ARN": "arn::secretsmanager::111111111111:secret:events!connection//-", - "CreatedDate": "datetime", - "Name": "events!connection//", - "SecretString": { - "client_id": "client_id", - "client_secret": "client_secret", - "authorization_endpoint": "https://example.com/oauth", - "http_method": "POST" - }, - "VersionId": "", - "VersionStages": [ - "AWSCURRENT" - ], - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_time_field": { - "recorded-date": "28-11-2024, 21:25:00", - "recorded-content": { - "put-events": { - "Entries": [ - { - "EventId": "" - } - ], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "sqs-messages": [ - { - "MessageId": "", - "ReceiptHandle": "", - "MD5OfBody": "m-d5-of-body", - "Body": { - "version": "0", - "id": "", - "detail-type": "test-detail-type", - "source": "test-source", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": { - "message": "test message" - } - } - } - ] - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[STRING]": { - "recorded-date": "05-12-2024, 14:33:58", - "recorded-content": { - "put-events": { - "Entries": [ - { - "ErrorCode": "MalformedDetail", - "ErrorMessage": "Detail is malformed." - } - ], - "FailedEntryCount": 1, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[ARRAY]": { - "recorded-date": "05-12-2024, 14:33:58", - "recorded-content": { - "put-events": { - "Entries": [ - { - "ErrorCode": "MalformedDetail", - "ErrorMessage": "Detail is malformed." - } - ], - "FailedEntryCount": 1, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[MALFORMED_JSON]": { - "recorded-date": "05-12-2024, 14:33:58", - "recorded-content": { - "put-events": { - "Entries": [ - { - "ErrorCode": "MalformedDetail", - "ErrorMessage": "Detail is malformed." - } - ], - "FailedEntryCount": 1, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[SERIALIZED_STRING]": { - "recorded-date": "05-12-2024, 14:33:58", - "recorded-content": { - "put-events": { - "Entries": [ - { - "ErrorCode": "MalformedDetail", - "ErrorMessage": "Detail is malformed." - } - ], - "FailedEntryCount": 1, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - } - } } } diff --git a/tests/aws/services/events/test_events.validation.json b/tests/aws/services/events/test_events.validation.json index 4cd06cde562ec..5e417d53f979d 100644 --- a/tests/aws/services/events/test_events.validation.json +++ b/tests/aws/services/events/test_events.validation.json @@ -1,211 +1,158 @@ { - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { - "last_validated_date": "2024-11-16T13:44:03+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { - "last_validated_date": "2024-11-16T13:44:04+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { - "last_validated_date": "2024-11-16T13:44:07+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { - "last_validated_date": "2024-11-16T13:44:07+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { - "last_validated_date": "2024-11-16T13:44:08+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[api-key]": { - "last_validated_date": "2024-11-21T15:16:35+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[basic]": { - "last_validated_date": "2024-11-21T15:16:35+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_connection_secrets[oauth]": { - "last_validated_date": "2024-11-21T15:16:36+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection": { - "last_validated_date": "2024-11-21T14:58:26+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_invalid_parameters": { - "last_validated_date": "2024-11-21T14:58:29+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_name_validation": { - "last_validated_date": "2024-11-21T14:58:30+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params0]": { - "last_validated_date": "2024-11-21T14:58:27+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params1]": { - "last_validated_date": "2024-11-21T14:58:27+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params2]": { - "last_validated_date": "2024-11-21T14:58:28+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_delete_connection": { - "last_validated_date": "2024-11-21T15:47:45+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_list_connections": { - "last_validated_date": "2024-11-21T14:58:28+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBridgeConnections::test_update_connection": { - "last_validated_date": "2024-11-21T15:39:32+00:00" - }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions0]": { - "last_validated_date": "2024-06-19T10:54:07+00:00" + "last_validated_date": "2024-12-06T16:56:15+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions1]": { - "last_validated_date": "2024-06-19T10:54:09+00:00" + "last_validated_date": "2024-12-06T16:56:17+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_multiple_event_buses_same_name": { - "last_validated_date": "2024-06-19T10:41:05+00:00" + "last_validated_date": "2024-12-06T16:56:18+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_delete_default_event_bus": { - "last_validated_date": "2024-06-19T10:41:07+00:00" + "last_validated_date": "2024-12-06T16:56:19+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_describe_delete_not_existing_event_bus": { - "last_validated_date": "2024-06-19T10:41:07+00:00" + "last_validated_date": "2024-12-06T16:56:19+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_limit": { - "last_validated_date": "2024-06-19T10:50:45+00:00" + "last_validated_date": "2024-12-06T16:56:22+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_prefix": { - "last_validated_date": "2024-06-19T10:49:27+00:00" + "last_validated_date": "2024-12-06T16:56:20+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[domain]": { - "last_validated_date": "2024-06-20T08:48:13+00:00" + "last_validated_date": "2024-12-06T16:57:03+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[path]": { - "last_validated_date": "2024-06-20T08:48:28+00:00" + "last_validated_date": "2024-12-06T16:57:18+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[standard]": { - "last_validated_date": "2024-06-20T08:47:59+00:00" + "last_validated_date": "2024-12-06T16:56:49+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_nonexistent_event_bus": { - "last_validated_date": "2024-06-19T10:45:41+00:00" + "last_validated_date": "2024-12-06T16:59:38+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_to_default_eventbus_for_custom_eventbus": { - "last_validated_date": "2024-06-19T10:41:47+00:00" + "last_validated_date": "2024-12-06T17:01:18+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[custom]": { - "last_validated_date": "2024-06-19T10:41:14+00:00" + "last_validated_date": "2024-12-06T16:56:27+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[default]": { - "last_validated_date": "2024-06-19T10:41:15+00:00" + "last_validated_date": "2024-12-06T16:56:29+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission_non_existing_event_bus": { - "last_validated_date": "2024-06-19T10:41:15+00:00" + "last_validated_date": "2024-12-06T16:56:29+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[custom]": { - "last_validated_date": "2024-06-19T10:41:17+00:00" + "last_validated_date": "2024-12-06T16:56:31+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[default]": { - "last_validated_date": "2024-06-19T10:41:18+00:00" + "last_validated_date": "2024-12-06T16:56:32+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-custom]": { - "last_validated_date": "2024-06-19T10:41:20+00:00" + "last_validated_date": "2024-12-06T16:56:34+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-default]": { - "last_validated_date": "2024-06-19T10:41:21+00:00" + "last_validated_date": "2024-12-06T16:56:36+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-custom]": { - "last_validated_date": "2024-06-19T10:41:18+00:00" + "last_validated_date": "2024-12-06T16:56:33+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-default]": { - "last_validated_date": "2024-06-19T10:41:19+00:00" + "last_validated_date": "2024-12-06T16:56:34+00:00" }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_nested": { - "last_validated_date": "2024-06-19T10:42:40+00:00" + "last_validated_date": "2024-12-06T17:00:14+00:00" }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_with_values_in_array": { - "last_validated_date": "2024-06-19T10:42:28+00:00" + "last_validated_date": "2024-12-06T17:00:02+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_delete_rule_with_targets": { - "last_validated_date": "2024-06-19T10:42:18+00:00" + "last_validated_date": "2024-12-06T16:59:52+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_describe_nonexistent_rule": { - "last_validated_date": "2024-06-19T10:42:14+00:00" + "last_validated_date": "2024-12-06T16:59:48+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[custom]": { - "last_validated_date": "2024-06-19T10:42:15+00:00" + "last_validated_date": "2024-12-06T16:59:49+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[default]": { - "last_validated_date": "2024-06-19T10:42:17+00:00" + "last_validated_date": "2024-12-06T16:59:51+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_list_rule_with_limit": { - "last_validated_date": "2024-06-19T10:42:12+00:00" + "last_validated_date": "2024-12-06T16:59:46+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[custom]": { - "last_validated_date": "2024-06-19T10:42:07+00:00" + "last_validated_date": "2024-12-06T16:59:40+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[default]": { - "last_validated_date": "2024-06-19T10:42:08+00:00" + "last_validated_date": "2024-12-06T16:59:42+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_multiple_rules_with_same_name": { - "last_validated_date": "2024-06-19T10:42:09+00:00" + "last_validated_date": "2024-12-06T16:59:43+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_update_rule_with_targets": { - "last_validated_date": "2024-06-19T10:42:20+00:00" + "last_validated_date": "2024-12-06T16:59:54+00:00" }, "tests/aws/services/events/test_events.py::TestEventTarget::test_add_exceed_fife_targets_per_rule": { - "last_validated_date": "2024-06-19T10:42:45+00:00" + "last_validated_date": "2024-12-06T17:00:20+00:00" }, "tests/aws/services/events/test_events.py::TestEventTarget::test_list_target_by_rule_limit": { - "last_validated_date": "2024-06-19T10:42:47+00:00" + "last_validated_date": "2024-12-06T17:00:21+00:00" }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[custom]": { - "last_validated_date": "2024-06-19T10:42:42+00:00" + "last_validated_date": "2024-12-06T17:00:17+00:00" }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[default]": { - "last_validated_date": "2024-06-19T10:42:44+00:00" + "last_validated_date": "2024-12-06T17:00:19+00:00" }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_target_id_validation": { - "last_validated_date": "2024-06-19T10:42:49+00:00" + "last_validated_date": "2024-12-06T17:00:24+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { - "last_validated_date": "2024-11-14T20:29:49+00:00" + "last_validated_date": "2024-12-06T16:53:21+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[ARRAY]": { - "last_validated_date": "2024-12-05T14:33:58+00:00" + "last_validated_date": "2024-12-06T16:53:16+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[MALFORMED_JSON]": { - "last_validated_date": "2024-12-05T14:33:58+00:00" + "last_validated_date": "2024-12-06T16:53:16+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[SERIALIZED_STRING]": { - "last_validated_date": "2024-12-05T14:33:58+00:00" + "last_validated_date": "2024-12-06T16:53:16+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[STRING]": { - "last_validated_date": "2024-12-05T14:33:58+00:00" + "last_validated_date": "2024-12-06T16:53:15+00:00" + }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_with_too_big_detail": { - "last_validated_date": "2024-10-18T07:36:18+00:00" + "last_validated_date": "2024-12-06T16:53:15+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail": { - "last_validated_date": "2024-06-19T10:40:51+00:00" + "last_validated_date": "2024-12-06T16:53:14+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail_type": { - "last_validated_date": "2024-11-14T22:43:51+00:00" + "last_validated_date": "2024-12-06T16:53:15+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[custom]": { - "last_validated_date": "2024-06-19T10:40:54+00:00" + "last_validated_date": "2024-12-06T16:53:20+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[default]": { - "last_validated_date": "2024-06-19T10:40:55+00:00" - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { - "last_validated_date": "2024-11-21T11:48:24+00:00" + "last_validated_date": "2024-12-06T16:53:20+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_time": { - "last_validated_date": "2024-08-27T10:02:33+00:00" - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_iam_permission_failure": { - "last_validated_date": "2024-11-20T12:32:10+00:00" + "last_validated_date": "2024-12-06T16:53:18+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_target_delivery_failure": { - "last_validated_date": "2024-11-20T17:19:19+00:00" + "last_validated_date": "2024-12-06T16:56:07+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_time_field": { - "last_validated_date": "2024-11-28T21:25:00+00:00" + "last_validated_date": "2024-12-06T17:04:30+00:00" }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_without_source": { - "last_validated_date": "2024-06-19T10:40:50+00:00" + "last_validated_date": "2024-12-06T16:53:14+00:00" + }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { + "last_validated_date": "2024-11-21T11:48:24+00:00" } } From 96e60167295ebb57738c0d31fc67a626b0295bd5 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Mon, 9 Dec 2024 10:14:38 +0100 Subject: [PATCH 04/10] fix: initiate fixture on class level --- tests/aws/services/events/conftest.py | 13 ------------- .../events/test_api_destinations_and_connection.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/aws/services/events/conftest.py b/tests/aws/services/events/conftest.py index 129a5b4779f28..f098f925601bf 100644 --- a/tests/aws/services/events/conftest.py +++ b/tests/aws/services/events/conftest.py @@ -4,7 +4,6 @@ import pytest -from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.aws.arns import get_partition from localstack.utils.strings import short_uid from localstack.utils.sync import retry @@ -446,15 +445,3 @@ def _create_api_destination(**kwargs): ) return _create_api_destination - - -@pytest.fixture -def api_destination_snapshots(snapshot, destination_name): - """Common snapshot transformers for API destination tests.""" - return TransformerUtility.eventbridge_api_destination(snapshot, destination_name) - - -@pytest.fixture(autouse=True) -def connection_snapshots(snapshot, connection_name): - """Common snapshot transformers for connection tests.""" - return TransformerUtility.eventbridge_connection(snapshot, connection_name) diff --git a/tests/aws/services/events/test_api_destinations_and_connection.py b/tests/aws/services/events/test_api_destinations_and_connection.py index 490f24128300a..560fabdec6030 100644 --- a/tests/aws/services/events/test_api_destinations_and_connection.py +++ b/tests/aws/services/events/test_api_destinations_and_connection.py @@ -2,6 +2,7 @@ from botocore.exceptions import ClientError from localstack.testing.pytest import markers +from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.sync import poll_condition from tests.aws.services.events.helper_functions import is_old_provider @@ -90,6 +91,11 @@ class TestEventBridgeApiDestinations: + @pytest.fixture + def api_destination_snapshots(self, snapshot, destination_name): + """Common snapshot transformers for API destination tests.""" + return TransformerUtility.eventbridge_api_destination(snapshot, destination_name) + @markers.aws.validated @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) @pytest.mark.skipif( @@ -186,6 +192,11 @@ def test_create_api_destination_name_validation( class TestEventBridgeApiDestinationConnections: + @pytest.fixture(autouse=True) + def connection_snapshots(self, snapshot, connection_name): + """Common snapshot transformers for connection tests.""" + return TransformerUtility.eventbridge_connection(snapshot, connection_name) + @markers.aws.validated @pytest.mark.skipif( is_old_provider(), From 2b6f510ff8c3021ff33b078b4609350876f253c6 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Mon, 9 Dec 2024 10:15:56 +0100 Subject: [PATCH 05/10] refactor: align naming of target tests --- tests/aws/services/events/test_events_targets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/aws/services/events/test_events_targets.py b/tests/aws/services/events/test_events_targets.py index 113d85be1894d..75237eeded3a0 100644 --- a/tests/aws/services/events/test_events_targets.py +++ b/tests/aws/services/events/test_events_targets.py @@ -39,7 +39,7 @@ # - Sagemaker (pro) -class TestEventTargetApiDestinations: +class TestEventsTargetApiDestination: # TODO validate against AWS @markers.aws.only_localstack @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) From 9d272f015e19a21c19bc95b18a87805efef26e64 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Mon, 9 Dec 2024 11:23:24 +0100 Subject: [PATCH 06/10] feat: use transformer defined in conftest --- .../testing/snapshots/transformer_utility.py | 30 ----- tests/aws/services/events/conftest.py | 29 +++++ .../test_api_destinations_and_connection.py | 115 +++++++++--------- ..._destinations_and_connection.snapshot.json | 82 ++++++------- ...estinations_and_connection.validation.json | 68 +++++------ 5 files changed, 164 insertions(+), 160 deletions(-) diff --git a/localstack-core/localstack/testing/snapshots/transformer_utility.py b/localstack-core/localstack/testing/snapshots/transformer_utility.py index 95bfc0b21cbc2..de8f96e8cd13f 100644 --- a/localstack-core/localstack/testing/snapshots/transformer_utility.py +++ b/localstack-core/localstack/testing/snapshots/transformer_utility.py @@ -744,36 +744,6 @@ def stepfunctions_api(): # def custom(fn: Callable[[dict], dict]) -> Transformer: # return GenericTransformer(fn) - @staticmethod - def eventbridge_api_destination(snapshot, connection_name: str): - """ - Add common transformers for EventBridge connection tests. - - Args: - snapshot: The snapshot instance to add transformers to - connection_name: The name of the connection to transform in the snapshot - """ - snapshot.add_transformer(snapshot.transform.regex(connection_name, "")) - snapshot.add_transformer( - snapshot.transform.key_value("ApiDestinationArn", reference_replacement=False) - ) - snapshot.add_transformer( - snapshot.transform.key_value("ConnectionArn", reference_replacement=False) - ) - return snapshot - - @staticmethod - def eventbridge_connection(snapshot, connection_name: str): - """ - Add common transformers for EventBridge connection tests. - Args: - snapshot: The snapshot instance to add transformers to - connection_name: The name of the connection to transform in the snapshot - """ - snapshot.add_transformer(snapshot.transform.regex(connection_name, "")) - snapshot.add_transformer(TransformerUtility.resource_name()) - return snapshot - def _sns_pem_file_token_transformer(key: str, val: str) -> str: if isinstance(val, str) and key.lower() == "SigningCertURL".lower(): diff --git a/tests/aws/services/events/conftest.py b/tests/aws/services/events/conftest.py index f098f925601bf..77b9d925e033c 100644 --- a/tests/aws/services/events/conftest.py +++ b/tests/aws/services/events/conftest.py @@ -4,6 +4,7 @@ import pytest +from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.aws.arns import get_partition from localstack.utils.strings import short_uid from localstack.utils.sync import retry @@ -445,3 +446,31 @@ def _create_api_destination(**kwargs): ) return _create_api_destination + + +############################# +# Common Transformer Fixtures +############################# + + +@pytest.fixture +def api_destination_snapshot(snapshot, destination_name): + snapshot.add_transformers_list( + [ + snapshot.transform.regex(destination_name, ""), + snapshot.transform.key_value("ApiDestinationArn", reference_replacement=False), + snapshot.transform.key_value("ConnectionArn", reference_replacement=False), + ] + ) + return snapshot + + +@pytest.fixture +def connection_snapshot(snapshot, connection_name): + snapshot.add_transformers_list( + [ + snapshot.transform.regex(connection_name, ""), + TransformerUtility.resource_name(), + ] + ) + return snapshot diff --git a/tests/aws/services/events/test_api_destinations_and_connection.py b/tests/aws/services/events/test_api_destinations_and_connection.py index 560fabdec6030..6fe1c7a604cad 100644 --- a/tests/aws/services/events/test_api_destinations_and_connection.py +++ b/tests/aws/services/events/test_api_destinations_and_connection.py @@ -2,7 +2,6 @@ from botocore.exceptions import ClientError from localstack.testing.pytest import markers -from localstack.testing.snapshots.transformer_utility import TransformerUtility from localstack.utils.sync import poll_condition from tests.aws.services.events.helper_functions import is_old_provider @@ -91,11 +90,6 @@ class TestEventBridgeApiDestinations: - @pytest.fixture - def api_destination_snapshots(self, snapshot, destination_name): - """Common snapshot transformers for API destination tests.""" - return TransformerUtility.eventbridge_api_destination(snapshot, destination_name) - @markers.aws.validated @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) @pytest.mark.skipif( @@ -105,11 +99,11 @@ def api_destination_snapshots(self, snapshot, destination_name): def test_api_destinations( self, aws_client, - api_destination_snapshots, create_connection, create_api_destination, destination_name, auth, + api_destination_snapshot, ): connection_response = create_connection(auth) connection_arn = connection_response["ConnectionArn"] @@ -120,13 +114,13 @@ def test_api_destinations( InvocationEndpoint="https://example.com/api", Description="Test API destination", ) - api_destination_snapshots.match("create-api-destination", response) + api_destination_snapshot.match("create-api-destination", response) describe_response = aws_client.events.describe_api_destination(Name=destination_name) - api_destination_snapshots.match("describe-api-destination", describe_response) + api_destination_snapshot.match("describe-api-destination", describe_response) list_response = aws_client.events.list_api_destinations(NamePrefix=destination_name) - api_destination_snapshots.match("list-api-destinations", list_response) + api_destination_snapshot.match("list-api-destinations", list_response) update_response = aws_client.events.update_api_destination( Name=destination_name, @@ -135,28 +129,28 @@ def test_api_destinations( InvocationEndpoint="https://example.com/api/v2", Description="Updated API destination", ) - api_destination_snapshots.match("update-api-destination", update_response) + api_destination_snapshot.match("update-api-destination", update_response) describe_updated_response = aws_client.events.describe_api_destination( Name=destination_name ) - api_destination_snapshots.match( + api_destination_snapshot.match( "describe-updated-api-destination", describe_updated_response ) delete_response = aws_client.events.delete_api_destination(Name=destination_name) - api_destination_snapshots.match("delete-api-destination", delete_response) + api_destination_snapshot.match("delete-api-destination", delete_response) with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc_info: aws_client.events.describe_api_destination(Name=destination_name) - api_destination_snapshots.match( + api_destination_snapshot.match( "describe-api-destination-not-found-error", exc_info.value.response ) @markers.aws.validated @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") def test_create_api_destination_invalid_parameters( - self, aws_client, api_destination_snapshots, connection_name, destination_name + self, aws_client, api_destination_snapshot, destination_name ): with pytest.raises(ClientError) as e: aws_client.events.create_api_destination( @@ -165,14 +159,14 @@ def test_create_api_destination_invalid_parameters( HttpMethod="INVALID_METHOD", InvocationEndpoint="invalid-endpoint", ) - api_destination_snapshots.match( + api_destination_snapshot.match( "create-api-destination-invalid-parameters-error", e.value.response ) @markers.aws.validated @pytest.mark.skipif(is_old_provider(), reason="V1 provider does not support this feature") def test_create_api_destination_name_validation( - self, aws_client, api_destination_snapshots, create_connection, connection_name + self, aws_client, api_destination_snapshot, create_connection ): invalid_name = "Invalid Name With Spaces!" @@ -186,23 +180,20 @@ def test_create_api_destination_name_validation( HttpMethod="POST", InvocationEndpoint="https://example.com/api", ) - api_destination_snapshots.match( + api_destination_snapshot.match( "create-api-destination-invalid-name-error", e.value.response ) -class TestEventBridgeApiDestinationConnections: - @pytest.fixture(autouse=True) - def connection_snapshots(self, snapshot, connection_name): - """Common snapshot transformers for connection tests.""" - return TransformerUtility.eventbridge_connection(snapshot, connection_name) - +class TestEventBridgeConnections: @markers.aws.validated @pytest.mark.skipif( is_old_provider(), reason="V1 provider does not support this feature", ) - def test_create_connection(self, aws_client, snapshot, create_connection, connection_name): + def test_create_connection( + self, aws_client, connection_snapshot, create_connection, connection_name + ): response = create_connection( "API_KEY", { @@ -210,10 +201,10 @@ def test_create_connection(self, aws_client, snapshot, create_connection, connec "InvocationHttpParameters": {}, }, ) - snapshot.match("create-connection", response) + connection_snapshot.match("create-connection", response) describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection", describe_response) + connection_snapshot.match("describe-connection", describe_response) @markers.aws.validated @pytest.mark.skipif( @@ -222,23 +213,25 @@ def test_create_connection(self, aws_client, snapshot, create_connection, connec ) @pytest.mark.parametrize("auth_params", API_DESTINATION_AUTH_PARAMS) def test_create_connection_with_auth( - self, aws_client, snapshot, create_connection, auth_params, connection_name + self, aws_client, connection_snapshot, create_connection, auth_params, connection_name ): response = create_connection( auth_params["AuthorizationType"], auth_params["AuthParameters"], ) - snapshot.match("create-connection-auth", response) + connection_snapshot.match("create-connection-auth", response) describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection-auth", describe_response) + connection_snapshot.match("describe-connection-auth", describe_response) @markers.aws.validated @pytest.mark.skipif( is_old_provider(), reason="V1 provider does not support this feature", ) - def test_list_connections(self, aws_client, snapshot, create_connection, connection_name): + def test_list_connections( + self, aws_client, connection_snapshot, create_connection, connection_name + ): create_connection( "BASIC", { @@ -248,14 +241,16 @@ def test_list_connections(self, aws_client, snapshot, create_connection, connect ) response = aws_client.events.list_connections(NamePrefix=connection_name) - snapshot.match("list-connections", response) + connection_snapshot.match("list-connections", response) @markers.aws.validated @pytest.mark.skipif( is_old_provider(), reason="V1 provider does not support this feature", ) - def test_delete_connection(self, aws_client, snapshot, create_connection, connection_name): + def test_delete_connection( + self, aws_client, connection_snapshot, create_connection, connection_name + ): response = create_connection( "API_KEY", { @@ -263,14 +258,14 @@ def test_delete_connection(self, aws_client, snapshot, create_connection, connec "InvocationHttpParameters": {}, }, ) - snapshot.match("create-connection-response", response) + connection_snapshot.match("create-connection-response", response) secret_arn = aws_client.events.describe_connection(Name=connection_name)["SecretArn"] # check if secret exists aws_client.secretsmanager.describe_secret(SecretId=secret_arn) delete_response = aws_client.events.delete_connection(Name=connection_name) - snapshot.match("delete-connection", delete_response) + connection_snapshot.match("delete-connection", delete_response) # wait until connection is deleted def is_connection_deleted(): @@ -284,7 +279,7 @@ def is_connection_deleted(): with pytest.raises(aws_client.events.exceptions.ResourceNotFoundException) as exc: aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-deleted-connection", exc.value.response) + connection_snapshot.match("describe-deleted-connection", exc.value.response) def is_secret_deleted(): try: @@ -303,21 +298,25 @@ def is_secret_deleted(): is_old_provider(), reason="V1 provider does not support this feature", ) - def test_create_connection_invalid_parameters(self, aws_client, snapshot, connection_name): + def test_create_connection_invalid_parameters( + self, aws_client, connection_snapshot, connection_name + ): with pytest.raises(ClientError) as e: aws_client.events.create_connection( Name=connection_name, AuthorizationType="INVALID_AUTH_TYPE", AuthParameters={}, ) - snapshot.match("create-connection-invalid-auth-error", e.value.response) + connection_snapshot.match("create-connection-invalid-auth-error", e.value.response) @markers.aws.validated @pytest.mark.skipif( is_old_provider(), reason="V1 provider does not support this feature", ) - def test_update_connection(self, aws_client, snapshot, create_connection, connection_name): + def test_update_connection( + self, aws_client, snapshot, connection_snapshot, create_connection, connection_name + ): create_response = create_connection( "BASIC", { @@ -325,23 +324,23 @@ def test_update_connection(self, aws_client, snapshot, create_connection, connec "InvocationHttpParameters": {}, }, ) - snapshot.match("create-connection", create_response) + connection_snapshot.match("create-connection", create_response) describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-created-connection", describe_response) + connection_snapshot.match("describe-created-connection", describe_response) # add secret id transformer secret_id = describe_response["SecretArn"] secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") - snapshot.add_transformer( + connection_snapshot.add_transformer( snapshot.transform.regex(secret_uuid, ""), priority=-1 ) - snapshot.add_transformer( + connection_snapshot.add_transformer( snapshot.transform.regex(secret_suffix, ""), priority=-1 ) get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret-before-update", get_secret_response) + connection_snapshot.match("connection-secret-before-update", get_secret_response) update_response = aws_client.events.update_connection( Name=connection_name, @@ -351,20 +350,20 @@ def test_update_connection(self, aws_client, snapshot, create_connection, connec "InvocationHttpParameters": {}, }, ) - snapshot.match("update-connection", update_response) + connection_snapshot.match("update-connection", update_response) describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-updated-connection", describe_response) + connection_snapshot.match("describe-updated-connection", describe_response) get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret-after-update", get_secret_response) + connection_snapshot.match("connection-secret-after-update", get_secret_response) @markers.aws.validated @pytest.mark.skipif( is_old_provider(), reason="V1 provider does not support this feature", ) - def test_create_connection_name_validation(self, aws_client, snapshot, connection_name): + def test_create_connection_name_validation(self, aws_client, connection_snapshot): invalid_name = "Invalid Name With Spaces!" with pytest.raises(ClientError) as e: @@ -376,7 +375,7 @@ def test_create_connection_name_validation(self, aws_client, snapshot, connectio "InvocationHttpParameters": {}, }, ) - snapshot.match("create-connection-invalid-name-error", e.value.response) + connection_snapshot.match("create-connection-invalid-name-error", e.value.response) @markers.aws.validated @pytest.mark.parametrize( @@ -387,24 +386,30 @@ def test_create_connection_name_validation(self, aws_client, snapshot, connectio reason="V1 provider does not support this feature", ) def test_connection_secrets( - self, aws_client, snapshot, create_connection, connection_name, auth_params + self, + aws_client, + snapshot, + connection_snapshot, + create_connection, + connection_name, + auth_params, ): response = create_connection( auth_params["AuthorizationType"], auth_params["AuthParameters"], ) - snapshot.match("create-connection-auth", response) + connection_snapshot.match("create-connection-auth", response) describe_response = aws_client.events.describe_connection(Name=connection_name) - snapshot.match("describe-connection-auth", describe_response) + connection_snapshot.match("describe-connection-auth", describe_response) secret_id = describe_response["SecretArn"] secret_uuid, _, secret_suffix = secret_id.rpartition("/")[2].rpartition("-") - snapshot.add_transformer( + connection_snapshot.add_transformer( snapshot.transform.regex(secret_uuid, ""), priority=-1 ) - snapshot.add_transformer( + connection_snapshot.add_transformer( snapshot.transform.regex(secret_suffix, ""), priority=-1 ) get_secret_response = aws_client.secretsmanager.get_secret_value(SecretId=secret_id) - snapshot.match("connection-secret", get_secret_response) + connection_snapshot.match("connection-secret", get_secret_response) diff --git a/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json b/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json index 1da904d08bf1f..3a1216c94be8f 100644 --- a/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json +++ b/tests/aws/services/events/test_api_destinations_and_connection.snapshot.json @@ -1,6 +1,6 @@ { - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection": { - "recorded-date": "06-12-2024, 17:07:01", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection": { + "recorded-date": "09-12-2024, 10:16:11", "recorded-content": { "create-connection": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -34,8 +34,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params0]": { - "recorded-date": "06-12-2024, 17:07:02", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params0]": { + "recorded-date": "09-12-2024, 10:16:12", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -68,8 +68,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params1]": { - "recorded-date": "06-12-2024, 17:07:02", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params1]": { + "recorded-date": "09-12-2024, 10:16:13", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -102,8 +102,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params2]": { - "recorded-date": "06-12-2024, 17:07:03", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params2]": { + "recorded-date": "09-12-2024, 10:16:13", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -140,8 +140,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_list_connections": { - "recorded-date": "06-12-2024, 17:07:04", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_list_connections": { + "recorded-date": "09-12-2024, 10:16:14", "recorded-content": { "list-connections": { "Connections": [ @@ -162,8 +162,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_delete_connection": { - "recorded-date": "06-12-2024, 17:07:11", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_delete_connection": { + "recorded-date": "09-12-2024, 10:16:19", "recorded-content": { "create-connection-response": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -198,8 +198,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_invalid_parameters": { - "recorded-date": "06-12-2024, 17:07:12", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_invalid_parameters": { + "recorded-date": "09-12-2024, 10:16:20", "recorded-content": { "create-connection-invalid-auth-error": { "Error": { @@ -213,8 +213,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_update_connection": { - "recorded-date": "06-12-2024, 17:07:14", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_update_connection": { + "recorded-date": "09-12-2024, 10:16:22", "recorded-content": { "create-connection": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -315,8 +315,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_name_validation": { - "recorded-date": "06-12-2024, 17:07:14", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_name_validation": { + "recorded-date": "09-12-2024, 10:16:22", "recorded-content": { "create-connection-invalid-name-error": { "Error": { @@ -330,8 +330,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[basic]": { - "recorded-date": "06-12-2024, 17:07:15", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[basic]": { + "recorded-date": "09-12-2024, 10:16:24", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -381,8 +381,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[api-key]": { - "recorded-date": "06-12-2024, 17:07:16", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[api-key]": { + "recorded-date": "09-12-2024, 10:16:25", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -432,8 +432,8 @@ } } }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[oauth]": { - "recorded-date": "06-12-2024, 17:07:17", + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[oauth]": { + "recorded-date": "09-12-2024, 10:16:25", "recorded-content": { "create-connection-auth": { "ConnectionArn": "arn::events::111111111111:connection//", @@ -490,7 +490,7 @@ } }, "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { - "recorded-date": "06-12-2024, 17:07:33", + "recorded-date": "09-12-2024, 10:21:06", "recorded-content": { "create-api-destination": { "ApiDestinationArn": "api-destination-arn", @@ -512,7 +512,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -529,7 +529,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -557,7 +557,7 @@ "InvocationEndpoint": "https://example.com/api/v2", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -572,7 +572,7 @@ "describe-api-destination-not-found-error": { "Error": { "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." }, "ResponseMetadata": { "HTTPHeaders": {}, @@ -582,7 +582,7 @@ } }, "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { - "recorded-date": "06-12-2024, 17:07:35", + "recorded-date": "09-12-2024, 10:21:08", "recorded-content": { "create-api-destination": { "ApiDestinationArn": "api-destination-arn", @@ -604,7 +604,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -621,7 +621,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -649,7 +649,7 @@ "InvocationEndpoint": "https://example.com/api/v2", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -664,7 +664,7 @@ "describe-api-destination-not-found-error": { "Error": { "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." }, "ResponseMetadata": { "HTTPHeaders": {}, @@ -674,7 +674,7 @@ } }, "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { - "recorded-date": "06-12-2024, 17:07:37", + "recorded-date": "09-12-2024, 10:21:10", "recorded-content": { "create-api-destination": { "ApiDestinationArn": "api-destination-arn", @@ -696,7 +696,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -713,7 +713,7 @@ "InvocationEndpoint": "https://example.com/api", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -741,7 +741,7 @@ "InvocationEndpoint": "https://example.com/api/v2", "InvocationRateLimitPerSecond": 300, "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -756,7 +756,7 @@ "describe-api-destination-not-found-error": { "Error": { "Code": "ResourceNotFoundException", - "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." + "Message": "Failed to describe the api-destination(s). An api-destination '' does not exist." }, "ResponseMetadata": { "HTTPHeaders": {}, @@ -766,7 +766,7 @@ } }, "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { - "recorded-date": "06-12-2024, 17:07:37", + "recorded-date": "09-12-2024, 10:21:11", "recorded-content": { "create-api-destination-invalid-parameters-error": { "Error": { @@ -781,7 +781,7 @@ } }, "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { - "recorded-date": "06-12-2024, 17:07:39", + "recorded-date": "09-12-2024, 10:21:12", "recorded-content": { "create-api-destination-invalid-name-error": { "Error": { diff --git a/tests/aws/services/events/test_api_destinations_and_connection.validation.json b/tests/aws/services/events/test_api_destinations_and_connection.validation.json index 13172ff8e0dd5..580cdf7853b68 100644 --- a/tests/aws/services/events/test_api_destinations_and_connection.validation.json +++ b/tests/aws/services/events/test_api_destinations_and_connection.validation.json @@ -1,53 +1,53 @@ { - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[api-key]": { - "last_validated_date": "2024-12-06T17:07:16+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { + "last_validated_date": "2024-12-09T10:21:06+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[basic]": { - "last_validated_date": "2024-12-06T17:07:15+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { + "last_validated_date": "2024-12-09T10:21:08+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_connection_secrets[oauth]": { - "last_validated_date": "2024-12-06T17:07:17+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { + "last_validated_date": "2024-12-09T10:21:10+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection": { - "last_validated_date": "2024-12-06T17:07:01+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { + "last_validated_date": "2024-12-09T10:21:11+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_invalid_parameters": { - "last_validated_date": "2024-12-06T17:07:12+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { + "last_validated_date": "2024-12-09T10:21:12+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_name_validation": { - "last_validated_date": "2024-12-06T17:07:14+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[api-key]": { + "last_validated_date": "2024-12-09T10:16:25+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params0]": { - "last_validated_date": "2024-12-06T17:07:01+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[basic]": { + "last_validated_date": "2024-12-09T10:16:24+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params1]": { - "last_validated_date": "2024-12-06T17:07:02+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_connection_secrets[oauth]": { + "last_validated_date": "2024-12-09T10:16:25+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_create_connection_with_auth[auth_params2]": { - "last_validated_date": "2024-12-06T17:07:03+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection": { + "last_validated_date": "2024-12-09T10:16:11+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_delete_connection": { - "last_validated_date": "2024-12-06T17:07:10+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_invalid_parameters": { + "last_validated_date": "2024-12-09T10:16:20+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_list_connections": { - "last_validated_date": "2024-12-06T17:07:04+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_name_validation": { + "last_validated_date": "2024-12-09T10:16:22+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinationConnections::test_update_connection": { - "last_validated_date": "2024-12-06T17:07:14+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params0]": { + "last_validated_date": "2024-12-09T10:16:12+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth0]": { - "last_validated_date": "2024-12-06T17:07:32+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params1]": { + "last_validated_date": "2024-12-09T10:16:12+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth1]": { - "last_validated_date": "2024-12-06T17:07:35+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_create_connection_with_auth[auth_params2]": { + "last_validated_date": "2024-12-09T10:16:13+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_api_destinations[auth2]": { - "last_validated_date": "2024-12-06T17:07:37+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_delete_connection": { + "last_validated_date": "2024-12-09T10:16:19+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_invalid_parameters": { - "last_validated_date": "2024-12-06T17:07:37+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_list_connections": { + "last_validated_date": "2024-12-09T10:16:14+00:00" }, - "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeApiDestinations::test_create_api_destination_name_validation": { - "last_validated_date": "2024-12-06T17:07:39+00:00" + "tests/aws/services/events/test_api_destinations_and_connection.py::TestEventBridgeConnections::test_update_connection": { + "last_validated_date": "2024-12-09T10:16:22+00:00" } } From 74d09276878fbc89fb127c1e36d218d339c8f899 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Mon, 9 Dec 2024 11:45:05 +0100 Subject: [PATCH 07/10] feat: update snapshots --- .../services/events/test_events.snapshot.json | 470 +++++++++--------- .../events/test_events.validation.json | 28 +- 2 files changed, 243 insertions(+), 255 deletions(-) diff --git a/tests/aws/services/events/test_events.snapshot.json b/tests/aws/services/events/test_events.snapshot.json index 725f66fbca4a6..206fa914d9049 100644 --- a/tests/aws/services/events/test_events.snapshot.json +++ b/tests/aws/services/events/test_events.snapshot.json @@ -1,6 +1,6 @@ { "tests/aws/services/events/test_events.py::TestEvents::test_put_events_without_source": { - "recorded-date": "06-12-2024, 16:53:14", + "recorded-date": "09-12-2024, 10:35:56", "recorded-content": { "put-events": { "Entries": [ @@ -18,7 +18,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail": { - "recorded-date": "06-12-2024, 16:53:14", + "recorded-date": "09-12-2024, 10:35:56", "recorded-content": { "put-events": { "Entries": [ @@ -36,7 +36,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_with_too_big_detail": { - "recorded-date": "06-12-2024, 16:53:15", + "recorded-date": "09-12-2024, 10:35:57", "recorded-content": { "put-events-too-big-detail-error": { "Error": { @@ -51,7 +51,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_without_detail_type": { - "recorded-date": "06-12-2024, 16:53:15", + "recorded-date": "09-12-2024, 10:35:57", "recorded-content": { "put-events": { "Entries": [ @@ -69,7 +69,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[STRING]": { - "recorded-date": "06-12-2024, 16:53:15", + "recorded-date": "09-12-2024, 10:35:57", "recorded-content": { "put-events": { "Entries": [ @@ -87,7 +87,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[ARRAY]": { - "recorded-date": "06-12-2024, 16:53:16", + "recorded-date": "09-12-2024, 10:35:58", "recorded-content": { "put-events": { "Entries": [ @@ -105,7 +105,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[MALFORMED_JSON]": { - "recorded-date": "06-12-2024, 16:53:16", + "recorded-date": "09-12-2024, 10:35:58", "recorded-content": { "put-events": { "Entries": [ @@ -123,7 +123,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_event_malformed_detail[SERIALIZED_STRING]": { - "recorded-date": "06-12-2024, 16:53:16", + "recorded-date": "09-12-2024, 10:35:58", "recorded-content": { "put-events": { "Entries": [ @@ -141,7 +141,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_time": { - "recorded-date": "06-12-2024, 16:53:19", + "recorded-date": "09-12-2024, 10:36:00", "recorded-content": { "messages": [ { @@ -202,7 +202,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[custom]": { - "recorded-date": "06-12-2024, 16:53:20", + "recorded-date": "09-12-2024, 10:36:02", "recorded-content": { "put-events-exceed-limit-error": { "Error": { @@ -217,7 +217,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[default]": { - "recorded-date": "06-12-2024, 16:53:20", + "recorded-date": "09-12-2024, 10:36:03", "recorded-content": { "put-events-exceed-limit-error": { "Error": { @@ -232,7 +232,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { - "recorded-date": "06-12-2024, 16:53:21", + "recorded-date": "09-12-2024, 10:36:03", "recorded-content": { "create_connection_exc": { "Error": { @@ -247,31 +247,62 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { - "recorded-date": "06-12-2024, 17:04:16", + "recorded-date": "09-12-2024, 10:41:48", "recorded-content": { "put-events-response": { "Entries": [ { - "EventId": "4edeb1d7-bae4-0302-b6b6-a9e8b7cd38f0" + "EventId": "event-id" } ], "FailedEntryCount": 0, "ResponseMetadata": { - "HTTPHeaders": { - "content-length": "85", - "content-type": "application/x-amz-json-1.1", - "date": "Fri, 06 Dec 2024 17:01:33 GMT", - "x-amzn-requestid": "f67cc244-96c2-4a2c-849a-451cb1e6686f" - }, - "HTTPStatusCode": 200, - "RequestId": "f67cc244-96c2-4a2c-849a-451cb1e6686f", - "RetryAttempts": 0 + "HTTPHeaders": {}, + "HTTPStatusCode": 200 } + }, + "sqs-messages": { + "queue1_messages": [ + { + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": "detail" + }, + "MD5OfBody": "", + "MessageId": "", + "ReceiptHandle": "" + } + ], + "queue2_messages": [ + { + "Body": { + "version": "0", + "id": "", + "detail-type": "core.update-account-command", + "source": "core.update-account-command", + "account": "111111111111", + "time": "date", + "region": "", + "resources": [], + "detail": "detail" + }, + "MD5OfBody": "", + "MessageId": "", + "ReceiptHandle": "" + } + ] } } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_target_delivery_failure": { - "recorded-date": "06-12-2024, 16:56:08", + "recorded-date": "09-12-2024, 10:38:50", "recorded-content": { "put-events-response": { "Entries": [ @@ -288,7 +319,7 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_with_time_field": { - "recorded-date": "06-12-2024, 17:04:30", + "recorded-date": "09-12-2024, 10:38:51", "recorded-content": { "put-events": { "Entries": [ @@ -325,10 +356,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions0]": { - "recorded-date": "06-12-2024, 16:56:15", + "recorded-date": "09-12-2024, 10:38:53", "recorded-content": { "create-custom-event-bus-us-east-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -337,10 +368,10 @@ "list-event-buses-after-create-us-east-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -349,10 +380,10 @@ } }, "describe-custom-event-bus-us-east-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -374,10 +405,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions1]": { - "recorded-date": "06-12-2024, 16:56:17", + "recorded-date": "09-12-2024, 10:38:55", "recorded-content": { "create-custom-event-bus-us-east-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -386,10 +417,10 @@ "list-event-buses-after-create-us-east-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -398,17 +429,17 @@ } }, "describe-custom-event-bus-us-east-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "create-custom-event-bus-us-west-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -417,10 +448,10 @@ "list-event-buses-after-create-us-west-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -429,17 +460,17 @@ } }, "describe-custom-event-bus-us-west-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "create-custom-event-bus-eu-central-1": { - "EventBusArn": "arn::events::111111111111:event-bus/", + "EventBusArn": "arn::events::111111111111:event-bus/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -448,10 +479,10 @@ "list-event-buses-after-create-eu-central-1": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -460,10 +491,10 @@ } }, "describe-custom-event-bus-eu-central-1": { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -511,34 +542,34 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_multiple_event_buses_same_name": { - "recorded-date": "06-12-2024, 16:56:19", + "recorded-date": "09-12-2024, 10:38:55", "recorded-content": { "create-multiple-event-buses-same-name": " already exists.') tblen=4>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_describe_delete_not_existing_event_bus": { - "recorded-date": "06-12-2024, 16:56:19", + "recorded-date": "09-12-2024, 10:38:57", "recorded-content": { "describe-not-existing-event-bus-error": " does not exist.') tblen=3>", "delete-not-existing-event-bus": " does not exist.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_delete_default_event_bus": { - "recorded-date": "06-12-2024, 16:56:19", + "recorded-date": "09-12-2024, 10:38:57", "recorded-content": { "delete-default-event-bus-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_prefix": { - "recorded-date": "06-12-2024, 16:56:21", + "recorded-date": "09-12-2024, 10:38:58", "recorded-content": { "list-event-buses-prefix-complete-name": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -549,10 +580,10 @@ "list-event-buses-prefix": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "" } ], "ResponseMetadata": { @@ -563,27 +594,27 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_list_event_buses_with_limit": { - "recorded-date": "06-12-2024, 16:56:25", + "recorded-date": "09-12-2024, 10:39:00", "recorded-content": { "list-event-buses-limit": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-0", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-0" }, { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-1", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-1" }, { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-2", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-2" } ], "NextToken": "", @@ -595,22 +626,22 @@ "list-event-buses-limit-next-token": { "EventBuses": [ { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-3", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-3" }, { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-4", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-4" }, { - "Arn": "arn::events::111111111111:event-bus/", + "Arn": "arn::events::111111111111:event-bus/-5", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "" + "Name": "-5" } ], "ResponseMetadata": { @@ -621,7 +652,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[custom]": { - "recorded-date": "06-12-2024, 16:56:28", + "recorded-date": "09-12-2024, 10:39:05", "recorded-content": { "put-permission": { "ResponseMetadata": { @@ -630,10 +661,10 @@ } }, "describe-event-bus-put-permission-multiple-principals": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -641,28 +672,28 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -672,10 +703,10 @@ } }, "describe-event-bus-put-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -683,35 +714,35 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": "*", "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -727,10 +758,10 @@ } }, "describe-event-bus-put-permission-policy": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -753,7 +784,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission[default]": { - "recorded-date": "06-12-2024, 16:56:29", + "recorded-date": "09-12-2024, 10:39:07", "recorded-content": { "put-permission": { "ResponseMetadata": { @@ -762,10 +793,10 @@ } }, "describe-event-bus-put-permission-multiple-principals": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -773,28 +804,28 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -804,10 +835,10 @@ } }, "describe-event-bus-put-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -815,35 +846,35 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" }, { "Sid": "", "Effect": "Allow", "Principal": "*", "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -859,10 +890,10 @@ } }, "describe-event-bus-put-permission-policy": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -885,13 +916,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_permission_non_existing_event_bus": { - "recorded-date": "06-12-2024, 16:56:29", + "recorded-date": "09-12-2024, 10:39:07", "recorded-content": { "remove-permission-non-existing-sid-error": " does not exist.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[custom]": { - "recorded-date": "06-12-2024, 16:56:31", + "recorded-date": "09-12-2024, 10:39:09", "recorded-content": { "remove-permission": { "ResponseMetadata": { @@ -900,10 +931,10 @@ } }, "describe-event-bus-remove-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -911,10 +942,10 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -930,10 +961,10 @@ } }, "describe-event-bus-remove-permission-all": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -942,7 +973,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission[default]": { - "recorded-date": "06-12-2024, 16:56:32", + "recorded-date": "09-12-2024, 10:39:10", "recorded-content": { "remove-permission": { "ResponseMetadata": { @@ -951,10 +982,10 @@ } }, "describe-event-bus-remove-permission": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "Policy": { "Version": "2012-10-17", "Statement": [ @@ -962,10 +993,10 @@ "Sid": "", "Effect": "Allow", "Principal": { - "AWS": "arn::iam:::" + "AWS": "arn::iam:::root" }, "Action": "events:PutEvents", - "Resource": "arn::events:::event-bus/" + "Resource": "arn::events:::event-bus/" } ] }, @@ -981,10 +1012,10 @@ } }, "describe-event-bus-remove-permission-all": { - "Arn": "arn::events:::event-bus/", + "Arn": "arn::events:::event-bus/", "CreationTime": "datetime", "LastModifiedTime": "datetime", - "Name": "", + "Name": "", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -993,31 +1024,31 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-custom]": { - "recorded-date": "06-12-2024, 16:56:33", + "recorded-date": "09-12-2024, 10:39:11", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[True-default]": { - "recorded-date": "06-12-2024, 16:56:34", + "recorded-date": "09-12-2024, 10:39:12", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-custom]": { - "recorded-date": "06-12-2024, 16:56:35", + "recorded-date": "09-12-2024, 10:39:13", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_remove_permission_non_existing_sid[False-default]": { - "recorded-date": "06-12-2024, 16:56:36", + "recorded-date": "09-12-2024, 10:39:14", "recorded-content": { "remove-permission-non-existing-sid-error": "" } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[standard]": { - "recorded-date": "06-12-2024, 16:56:51", + "recorded-date": "09-12-2024, 10:39:27", "recorded-content": { "messages": [ { @@ -1046,7 +1077,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[domain]": { - "recorded-date": "06-12-2024, 16:57:06", + "recorded-date": "09-12-2024, 10:39:42", "recorded-content": { "messages": [ { @@ -1075,7 +1106,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_bus_to_bus[path]": { - "recorded-date": "06-12-2024, 16:57:20", + "recorded-date": "09-12-2024, 10:39:57", "recorded-content": { "messages": [ { @@ -1104,7 +1135,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_to_default_eventbus_for_custom_eventbus": { - "recorded-date": "06-12-2024, 17:01:21", + "recorded-date": "09-12-2024, 10:40:25", "recorded-content": { "create-custom-event-bus": { "EventBusArn": "arn::events::111111111111:event-bus/", @@ -1183,7 +1214,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_nonexistent_event_bus": { - "recorded-date": "06-12-2024, 16:59:39", + "recorded-date": "09-12-2024, 10:44:29", "recorded-content": { "put-events": { "Entries": [ @@ -1233,10 +1264,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[custom]": { - "recorded-date": "06-12-2024, 16:59:41", + "recorded-date": "09-12-2024, 10:40:45", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1245,7 +1276,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1260,7 +1291,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -1270,7 +1301,7 @@ } }, "describe-rule": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1286,7 +1317,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1309,10 +1340,10 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[default]": { - "recorded-date": "06-12-2024, 16:59:42", + "recorded-date": "09-12-2024, 10:40:47", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule/", + "RuleArn": "arn::events::111111111111:rule/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1321,7 +1352,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "EventBusName": "default", "EventPattern": { "source": [ @@ -1336,7 +1367,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -1346,7 +1377,7 @@ } }, "describe-rule": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1362,7 +1393,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1385,17 +1416,17 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_multiple_rules_with_same_name": { - "recorded-date": "06-12-2024, 16:59:44", + "recorded-date": "09-12-2024, 10:40:48", "recorded-content": { "put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 } }, "re-put-rule": { - "RuleArn": "arn::events::111111111111:rule//", + "RuleArn": "arn::events::111111111111:rule//", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1404,7 +1435,7 @@ "list-rules": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "EventBusName": "", "EventPattern": { "source": [ @@ -1419,7 +1450,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED" } ], @@ -1431,13 +1462,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_list_rule_with_limit": { - "recorded-date": "06-12-2024, 16:59:48", + "recorded-date": "09-12-2024, 10:40:51", "recorded-content": { "list-rules-limit": { "NextToken": "", "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-0", "EventBusName": "", "EventPattern": { "source": [ @@ -1452,11 +1483,11 @@ ] } }, - "Name": "", + "Name": "-0", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-1", "EventBusName": "", "EventPattern": { "source": [ @@ -1471,11 +1502,11 @@ ] } }, - "Name": "", + "Name": "-1", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-2", "EventBusName": "", "EventPattern": { "source": [ @@ -1490,7 +1521,7 @@ ] } }, - "Name": "", + "Name": "-2", "State": "ENABLED" } ], @@ -1502,7 +1533,7 @@ "list-rules-limit-next-token": { "Rules": [ { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-3", "EventBusName": "", "EventPattern": { "source": [ @@ -1517,11 +1548,11 @@ ] } }, - "Name": "", + "Name": "-3", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-4", "EventBusName": "", "EventPattern": { "source": [ @@ -1536,11 +1567,11 @@ ] } }, - "Name": "", + "Name": "-4", "State": "ENABLED" }, { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//-5", "EventBusName": "", "EventPattern": { "source": [ @@ -1555,7 +1586,7 @@ ] } }, - "Name": "", + "Name": "-5", "State": "ENABLED" } ], @@ -1567,13 +1598,13 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_describe_nonexistent_rule": { - "recorded-date": "06-12-2024, 16:59:48", + "recorded-date": "09-12-2024, 10:40:53", "recorded-content": { "describe-not-existing-rule-error": " does not exist on EventBus default.') tblen=3>" } }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[custom]": { - "recorded-date": "06-12-2024, 16:59:50", + "recorded-date": "09-12-2024, 10:40:54", "recorded-content": { "disable-rule": { "ResponseMetadata": { @@ -1582,7 +1613,7 @@ } }, "describe-rule-disabled": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1598,7 +1629,7 @@ ] } }, - "Name": "", + "Name": "", "State": "DISABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1612,7 +1643,7 @@ } }, "describe-rule-enabled": { - "Arn": "arn::events::111111111111:rule//", + "Arn": "arn::events::111111111111:rule//", "CreatedBy": "111111111111", "EventBusName": "", "EventPattern": { @@ -1628,7 +1659,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1638,7 +1669,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_disable_re_enable_rule[default]": { - "recorded-date": "06-12-2024, 16:59:51", + "recorded-date": "09-12-2024, 10:40:56", "recorded-content": { "disable-rule": { "ResponseMetadata": { @@ -1647,7 +1678,7 @@ } }, "describe-rule-disabled": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1663,7 +1694,7 @@ ] } }, - "Name": "", + "Name": "", "State": "DISABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1677,7 +1708,7 @@ } }, "describe-rule-enabled": { - "Arn": "arn::events::111111111111:rule/", + "Arn": "arn::events::111111111111:rule/", "CreatedBy": "111111111111", "EventBusName": "default", "EventPattern": { @@ -1693,7 +1724,7 @@ ] } }, - "Name": "", + "Name": "", "State": "ENABLED", "ResponseMetadata": { "HTTPHeaders": {}, @@ -1703,18 +1734,18 @@ } }, "tests/aws/services/events/test_events.py::TestEventRule::test_delete_rule_with_targets": { - "recorded-date": "06-12-2024, 16:59:53", + "recorded-date": "09-12-2024, 10:40:57", "recorded-content": { "delete-rule-with-targets-error": "" } }, "tests/aws/services/events/test_events.py::TestEventRule::test_update_rule_with_targets": { - "recorded-date": "06-12-2024, 16:59:54", + "recorded-date": "09-12-2024, 10:40:59", "recorded-content": { "list-targets": { "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "" } ], @@ -1724,7 +1755,7 @@ } }, "update-rule": { - "RuleArn": "arn::events::111111111111:rule/", + "RuleArn": "arn::events::111111111111:rule/", "ResponseMetadata": { "HTTPHeaders": {}, "HTTPStatusCode": 200 @@ -1733,7 +1764,7 @@ "list-targets-after-update": { "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "" } ], @@ -1745,7 +1776,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_with_values_in_array": { - "recorded-date": "06-12-2024, 17:00:03", + "recorded-date": "09-12-2024, 10:41:07", "recorded-content": { "messages": [ { @@ -1781,7 +1812,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventPattern::test_put_events_pattern_nested": { - "recorded-date": "06-12-2024, 17:00:15", + "recorded-date": "09-12-2024, 10:41:20", "recorded-content": { "messages": [ { @@ -1800,7 +1831,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[custom]": { - "recorded-date": "06-12-2024, 17:00:18", + "recorded-date": "09-12-2024, 10:41:22", "recorded-content": { "put-target": { "FailedEntries": [], @@ -1813,7 +1844,7 @@ "list-targets": { "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "" } ], @@ -1840,7 +1871,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_list_remove_target[default]": { - "recorded-date": "06-12-2024, 17:00:19", + "recorded-date": "09-12-2024, 10:41:24", "recorded-content": { "put-target": { "FailedEntries": [], @@ -1853,7 +1884,7 @@ "list-targets": { "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "" } ], @@ -1880,27 +1911,27 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_add_exceed_fife_targets_per_rule": { - "recorded-date": "06-12-2024, 17:00:20", + "recorded-date": "09-12-2024, 10:41:25", "recorded-content": { "put-targets-client-error": "" } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_list_target_by_rule_limit": { - "recorded-date": "06-12-2024, 17:00:22", + "recorded-date": "09-12-2024, 10:41:27", "recorded-content": { "list-targets-limit": { "NextToken": "", "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "0" }, { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "1" }, { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "2" } ], @@ -1912,11 +1943,11 @@ "list-targets-limit-next-token": { "Targets": [ { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "3" }, { - "Arn": "arn::sqs::111111111111:", + "Arn": "", "Id": "4" } ], @@ -1928,7 +1959,7 @@ } }, "tests/aws/services/events/test_events.py::TestEventTarget::test_put_target_id_validation": { - "recorded-date": "06-12-2024, 17:00:24", + "recorded-date": "09-12-2024, 10:41:30", "recorded-content": { "put-targets-invalid-id-error": { "Error": { @@ -1951,60 +1982,5 @@ } } } - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { - "recorded-date": "20-11-2024, 12:32:18", - "recorded-content": { - "put-events-response": { - "Entries": [ - { - "EventId": "event-id" - } - ], - "FailedEntryCount": 0, - "ResponseMetadata": { - "HTTPHeaders": {}, - "HTTPStatusCode": 200 - } - }, - "sqs-messages": { - "queue1_messages": [ - { - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": "detail" - }, - "MD5OfBody": "", - "MessageId": "", - "ReceiptHandle": "" - } - ], - "queue2_messages": [ - { - "Body": { - "version": "0", - "id": "", - "detail-type": "core.update-account-command", - "source": "core.update-account-command", - "account": "111111111111", - "time": "date", - "region": "", - "resources": [], - "detail": "detail" - }, - "MD5OfBody": "", - "MessageId": "", - "ReceiptHandle": "" - } - ] - } - } } } diff --git a/tests/aws/services/events/test_events.validation.json b/tests/aws/services/events/test_events.validation.json index 5e417d53f979d..4a24e14b29578 100644 --- a/tests/aws/services/events/test_events.validation.json +++ b/tests/aws/services/events/test_events.validation.json @@ -1,8 +1,19 @@ { - "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions0]": { - "last_validated_date": "2024-12-06T16:56:15+00:00" - }, - "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions1]": { + "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_nonexistent_event_bus": { + "last_validated_date": "2024-12-09T10:44:29+00:00" + } +} + +} +" + } +} +" + } +} + } +} + "tests/aws/services/events/test_events.py::TestEventBus::test_create_list_describe_delete_custom_event_buses[regions1]": { "last_validated_date": "2024-12-06T16:56:17+00:00" }, "tests/aws/services/events/test_events.py::TestEventBus::test_create_multiple_event_buses_same_name": { @@ -84,7 +95,7 @@ "last_validated_date": "2024-12-06T16:59:46+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[custom]": { - "last_validated_date": "2024-12-06T16:59:40+00:00" + "last_validated_date": "2024-12-09T10:35:32+00:00" }, "tests/aws/services/events/test_events.py::TestEventRule::test_put_list_with_prefix_describe_delete_rule[default]": { "last_validated_date": "2024-12-06T16:59:42+00:00" @@ -140,6 +151,9 @@ "tests/aws/services/events/test_events.py::TestEvents::test_put_events_exceed_limit_ten_entries[default]": { "last_validated_date": "2024-12-06T16:53:20+00:00" }, + "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { + "last_validated_date": "2024-11-21T11:48:24+00:00" + }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_time": { "last_validated_date": "2024-12-06T16:53:18+00:00" }, @@ -151,8 +165,6 @@ }, "tests/aws/services/events/test_events.py::TestEvents::test_put_events_without_source": { "last_validated_date": "2024-12-06T16:53:14+00:00" - }, - "tests/aws/services/events/test_events.py::TestEvents::test_put_events_response_entries_order": { - "last_validated_date": "2024-11-21T11:48:24+00:00" } } +} From 6b959f7fbcfdcf02adda34968dae5ca4cf371d33 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Mon, 9 Dec 2024 12:04:37 +0100 Subject: [PATCH 08/10] feat: skip api destination test for old provider --- tests/aws/services/events/test_events_targets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/aws/services/events/test_events_targets.py b/tests/aws/services/events/test_events_targets.py index 75237eeded3a0..bfa433591fb33 100644 --- a/tests/aws/services/events/test_events_targets.py +++ b/tests/aws/services/events/test_events_targets.py @@ -42,6 +42,7 @@ class TestEventsTargetApiDestination: # TODO validate against AWS @markers.aws.only_localstack + @pytest.mark.skipif(is_old_provider(), reason="not supported by the old provider") @pytest.mark.parametrize("auth", API_DESTINATION_AUTHS) def test_put_events_to_target_api_destinations( self, httpserver: HTTPServer, auth, aws_client, clean_up From 382cc1cdde3a731658298c161b123a90c5620511 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Fri, 13 Dec 2024 11:55:12 +0100 Subject: [PATCH 09/10] fix: snapshot order changed --- tests/aws/services/events/test_events.snapshot.json | 4 ++-- tests/aws/services/events/test_events.validation.json | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/aws/services/events/test_events.snapshot.json b/tests/aws/services/events/test_events.snapshot.json index 206fa914d9049..33ae5bc1c260f 100644 --- a/tests/aws/services/events/test_events.snapshot.json +++ b/tests/aws/services/events/test_events.snapshot.json @@ -232,12 +232,12 @@ } }, "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { - "recorded-date": "09-12-2024, 10:36:03", + "recorded-date": "13-12-2024, 10:54:30", "recorded-content": { "create_connection_exc": { "Error": { "Code": "ValidationException", - "Message": "3 validation errors detected: Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must have length less than or equal to 64; Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+; Value 'INVALID' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" + "Message": "3 validation errors detected: Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\.\\-_A-Za-z0-9]+; Value 'This should fail with two errors 123467890123412341234123412341234' at 'name' failed to satisfy constraint: Member must have length less than or equal to 64; Value 'INVALID' at 'authorizationType' failed to satisfy constraint: Member must satisfy enum value set: [BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY]" }, "ResponseMetadata": { "HTTPHeaders": {}, diff --git a/tests/aws/services/events/test_events.validation.json b/tests/aws/services/events/test_events.validation.json index 4a24e14b29578..c7a4c7efa0a3b 100644 --- a/tests/aws/services/events/test_events.validation.json +++ b/tests/aws/services/events/test_events.validation.json @@ -1,8 +1,10 @@ { - "tests/aws/services/events/test_events.py::TestEventBus::test_put_events_nonexistent_event_bus": { - "last_validated_date": "2024-12-09T10:44:29+00:00" + "tests/aws/services/events/test_events.py::TestEvents::test_create_connection_validations": { + "last_validated_date": "2024-12-13T10:54:30+00:00" } } + } +} } " From f4d8f3121fbf4b5572878f197cd8fd97df37fd81 Mon Sep 17 00:00:00 2001 From: maxhoheiser Date: Fri, 13 Dec 2024 12:18:57 +0100 Subject: [PATCH 10/10] fix: auth test parameters --- .../test_api_destinations_and_connection.py | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/tests/aws/services/events/test_api_destinations_and_connection.py b/tests/aws/services/events/test_api_destinations_and_connection.py index 6fe1c7a604cad..00e0aec57536c 100644 --- a/tests/aws/services/events/test_api_destinations_and_connection.py +++ b/tests/aws/services/events/test_api_destinations_and_connection.py @@ -32,37 +32,6 @@ }, ] -API_DESTINATION_AUTHS = [ - { - "type": "BASIC", - "key": "BasicAuthParameters", - "parameters": {"Username": "user", "Password": "pass"}, - }, - { - "type": "API_KEY", - "key": "ApiKeyAuthParameters", - "parameters": {"ApiKeyName": "ApiKey", "ApiKeyValue": "secret"}, - }, - { - "type": "OAUTH_CLIENT_CREDENTIALS", - "key": "OAuthParameters", - "parameters": { - "ClientParameters": {"ClientID": "id", "ClientSecret": "password"}, - "AuthorizationEndpoint": "https://example.com/oauth", - "HttpMethod": "POST", - "OAuthHttpParameters": { - "BodyParameters": [{"Key": "oauthbody", "Value": "value1", "IsValueSecret": False}], - "HeaderParameters": [ - {"Key": "oauthheader", "Value": "value2", "IsValueSecret": False} - ], - "QueryStringParameters": [ - {"Key": "oauthquery", "Value": "value3", "IsValueSecret": False} - ], - }, - }, - }, -] - API_DESTINATION_AUTH_PARAMS = [ { "AuthorizationType": "BASIC",