@@ -170,6 +170,30 @@ describe('Invoke EMR Containers Start Job Run with ', () => {
170
170
} ) ;
171
171
} ) ;
172
172
173
+ test ( 'Job Driver with Entry Point Arguments' , ( ) => {
174
+ // WHEN
175
+ const task = new EmrContainersStartJobRun ( stack , 'EMR Containers Start Job Run' , {
176
+ ...defaultProps ,
177
+ jobDriver : {
178
+ sparkSubmitJobDriver : {
179
+ entryPoint : sfn . TaskInput . fromText ( 'entrypoint' ) ,
180
+ entryPointArguments : sfn . TaskInput . fromJsonPathAt ( '$.entrypointArguments' ) ,
181
+ } ,
182
+ } ,
183
+ } ) ;
184
+
185
+ // THEN
186
+ expect ( stack . resolve ( task . toStateJson ( ) ) ) . toMatchObject ( {
187
+ Parameters : {
188
+ JobDriver : {
189
+ SparkSubmitJobDriver : {
190
+ 'EntryPoint' : 'entrypoint' ,
191
+ 'EntryPointArguments.$' : '$.entrypointArguments' ,
192
+ } ,
193
+ } ,
194
+ } ,
195
+ } ) ;
196
+ } ) ;
173
197
174
198
test ( 'Job Execution Role' , ( ) => {
175
199
// WHEN
@@ -627,7 +651,7 @@ describe('Invoke EMR Containers Start Job Run with ', () => {
627
651
} ) . toThrow ( 'Entry point must be between 1 and 256 characters in length. Received 0.' ) ;
628
652
} ) ;
629
653
630
- test ( 'Entry Point Arguments is not an string array that is between 1 and 10280 entries in length' , ( ) => {
654
+ test ( 'Entry Point Arguments is not a string array that is between 1 and 10280 entries in length' , ( ) => {
631
655
// WHEN
632
656
const entryPointArgs = sfn . TaskInput . fromObject ( new Array ( 10281 ) . fill ( 'x' , 10281 ) ) ;
633
657
const entryPointArgsNone = sfn . TaskInput . fromObject ( [ ] ) ;
@@ -645,7 +669,7 @@ describe('Invoke EMR Containers Start Job Run with ', () => {
645
669
} ,
646
670
} ,
647
671
} ) ;
648
- } ) . toThrow ( 'Entry point arguments must be a string array or encoded JSON path but received object' ) ;
672
+ } ) . toThrow ( 'Entry point arguments must be a string array or an encoded JSON path but received object' ) ;
649
673
650
674
// THEN
651
675
expect ( ( ) => {
@@ -658,7 +682,7 @@ describe('Invoke EMR Containers Start Job Run with ', () => {
658
682
} ,
659
683
} ,
660
684
} ) ;
661
- } ) . toThrow ( 'Entry point arguments must be a string array or encoded JSON path, but received a non JSON path string' ) ;
685
+ } ) . toThrow ( 'Entry point arguments must be a string array or an encoded JSON path, but received a non JSON path string' ) ;
662
686
663
687
// THEN
664
688
expect ( ( ) => {
0 commit comments