@@ -667,9 +667,12 @@ describe("readTraceFromLambdaContext", () => {
667
667
} ) ;
668
668
669
669
describe ( "readStepFunctionContextFromEvent" , ( ) => {
670
- const stepFunctionEventWithoutInput = {
670
+ const stepFunctionEvent = {
671
671
Execution : {
672
672
Id : "arn:aws:states:sa-east-1:425362996713:express:logs-to-traces-sequential:85a9933e-9e11-83dc-6a61-b92367b6c3be:3f7ef5c7-c8b8-4c88-90a1-d54aa7e7e2bf" ,
673
+ Input : {
674
+ MyInput : "MyValue"
675
+ } ,
673
676
Name : "85a9933e-9e11-83dc-6a61-b92367b6c3be" ,
674
677
RoleArn : "arn:aws:iam::425362996713:role/service-role/StepFunctions-logs-to-traces-sequential-role-ccd69c03" ,
675
678
StartTime : "2022-12-08T21:08:17.924Z" ,
@@ -685,31 +688,6 @@ describe("readStepFunctionContextFromEvent", () => {
685
688
} ,
686
689
} as const ;
687
690
688
- const stepFunctionEvent = {
689
- ...stepFunctionEventWithoutInput ,
690
- Execution : {
691
- ...stepFunctionEventWithoutInput . Execution ,
692
- Input : {
693
- MyInput : "MyValue"
694
- }
695
- }
696
- } as const ;
697
-
698
- it ( "reads a step function context from event without Execution.Input" , ( ) => {
699
- const result = readStepFunctionContextFromEvent ( stepFunctionEventWithoutInput ) ;
700
- expect ( result ) . toEqual ( {
701
- "step_function.execution_id" : "arn:aws:states:sa-east-1:425362996713:express:logs-to-traces-sequential:85a9933e-9e11-83dc-6a61-b92367b6c3be:3f7ef5c7-c8b8-4c88-90a1-d54aa7e7e2bf" ,
702
- "step_function.execution_input" : null ,
703
- "step_function.execution_name" : "85a9933e-9e11-83dc-6a61-b92367b6c3be" ,
704
- "step_function.execution_role_arn" : "arn:aws:iam::425362996713:role/service-role/StepFunctions-logs-to-traces-sequential-role-ccd69c03" ,
705
- "step_function.execution_start_time" : "2022-12-08T21:08:17.924Z" ,
706
- "step_function.state_entered_time" : "2022-12-08T21:08:19.224Z" ,
707
- "step_function.state_machine_arn" : "arn:aws:states:sa-east-1:425362996713:stateMachine:logs-to-traces-sequential" ,
708
- "step_function.state_machine_name" : "my-state-machine" ,
709
- "step_function.state_name" : "step-one" ,
710
- "step_function.state_retry_count" : 2 ,
711
- } ) ;
712
- } ) ;
713
691
it ( "reads a step function context from event with Execution.Input" , ( ) => {
714
692
const result = readStepFunctionContextFromEvent ( stepFunctionEvent ) ;
715
693
expect ( result ) . toEqual ( {
0 commit comments