File tree 3 files changed +28
-0
lines changed
aws_lambda_powertools/utilities/data_classes
unit/data_classes/required_dependencies 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 18
18
from .cloud_watch_custom_widget_event import CloudWatchDashboardCustomWidgetEvent
19
19
from .cloud_watch_logs_event import CloudWatchLogsEvent
20
20
from .cloudformation_custom_resource_event import CloudFormationCustomResourceEvent
21
+ from .code_deploy_lifecycle_hook_event import (
22
+ CodeDeployLifeCycleHookLambdaEvent ,
23
+ )
21
24
from .code_pipeline_job_event import CodePipelineJobEvent
22
25
from .connect_contact_flow_event import ConnectContactFlowEvent
23
26
from .dynamo_db_stream_event import DynamoDBStreamEvent
59
62
"CloudWatchAlarmMetricStat" ,
60
63
"CloudWatchDashboardCustomWidgetEvent" ,
61
64
"CloudWatchLogsEvent" ,
65
+ "CodeDeployLifeCycleHookLambdaEvent" ,
62
66
"CodePipelineJobEvent" ,
63
67
"ConnectContactFlowEvent" ,
64
68
"DynamoDBStreamEvent" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "DeploymentId" : " d-ABCDEF" ,
3
+ "LifecycleEventHookExecutionId" : " xxxxxxxxxxxxxxxxxxxxxxxx"
4
+ }
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+ from aws_lambda_powertools .utilities .data_classes import (
4
+ CodeDeployLifeCycleHookLambdaEvent ,
5
+ )
6
+ from tests .functional .utils import load_event
7
+
8
+
9
+ @pytest .mark .parametrize (
10
+ "event_file" ,
11
+ [
12
+ "codeDeployLifecycleHookEvent.json" ,
13
+ ],
14
+ )
15
+ def test_code_deploy_lifecycle_hook_event (event_file ):
16
+ raw_event = load_event (event_file )
17
+ parsed_event = CodeDeployLifeCycleHookLambdaEvent (raw_event )
18
+
19
+ assert parsed_event .deployment_id == raw_event ["DeploymentId" ]
20
+ assert parsed_event .lifecycle_event_hook_execution_id == raw_event ["LifecycleEventHookExecutionId" ]
You can’t perform that action at this time.
0 commit comments