@@ -63,7 +63,7 @@ test('calls the updateStateMachine() API when it receives only a definitionStrin
63
63
expect ( deployStackResult ) . not . toBeUndefined ( ) ;
64
64
expect ( mockUpdateMachineDefinition ) . toHaveBeenCalledWith ( {
65
65
definition : '{ Prop: "new-value" }' ,
66
- stateMachineArn : 'my-machine' ,
66
+ stateMachineArn : 'arn:aws:states:here:123456789012:stateMachine: my-machine' ,
67
67
} ) ;
68
68
} ) ;
69
69
@@ -138,7 +138,7 @@ test('calls the updateStateMachine() API when it receives only a definitionStrin
138
138
} ,
139
139
} ,
140
140
} , null , 2 ) ,
141
- stateMachineArn : 'my-machine' ,
141
+ stateMachineArn : 'arn:aws:states:here:123456789012:stateMachine: my-machine' ,
142
142
} ) ;
143
143
} ) ;
144
144
@@ -168,14 +168,14 @@ test('calls the updateStateMachine() API when it receives a change to the defini
168
168
} ) ;
169
169
170
170
// WHEN
171
- setup . pushStackResourceSummaries ( setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'mock -machine-resource-id ' ) ) ;
171
+ setup . pushStackResourceSummaries ( setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'arn:aws:states:here:123456789012:stateMachine:my -machine' ) ) ;
172
172
const deployStackResult = await hotswapMockSdkProvider . tryHotswapDeployment ( cdkStackArtifact ) ;
173
173
174
174
// THEN
175
175
expect ( deployStackResult ) . not . toBeUndefined ( ) ;
176
176
expect ( mockUpdateMachineDefinition ) . toHaveBeenCalledWith ( {
177
177
definition : '{ "Prop" : "new-value" }' ,
178
- stateMachineArn : 'mock -machine-resource-id' , // the sdk will convert the ID to the arn in a production environment
178
+ stateMachineArn : 'arn:aws:states:here:123456789012:stateMachine:my -machine' ,
179
179
} ) ;
180
180
} ) ;
181
181
@@ -256,7 +256,7 @@ test('can correctly hotswap old style synth changes', async () => {
256
256
setup . setCurrentCfnStackTemplate ( {
257
257
Parameters : { AssetParam1 : { Type : 'String' } } ,
258
258
Resources : {
259
- SM : {
259
+ Machine : {
260
260
Type : 'AWS::StepFunctions::StateMachine' ,
261
261
Properties : {
262
262
DefinitionString : { Ref : 'AssetParam1' } ,
@@ -269,7 +269,7 @@ test('can correctly hotswap old style synth changes', async () => {
269
269
template : {
270
270
Parameters : { AssetParam2 : { Type : String } } ,
271
271
Resources : {
272
- SM : {
272
+ Machine : {
273
273
Type : 'AWS::StepFunctions::StateMachine' ,
274
274
Properties : {
275
275
DefinitionString : { Ref : 'AssetParam2' } ,
@@ -281,13 +281,14 @@ test('can correctly hotswap old style synth changes', async () => {
281
281
} ) ;
282
282
283
283
// WHEN
284
+ setup . pushStackResourceSummaries ( setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'arn:aws:states:here:123456789012:stateMachine:my-machine' ) ) ;
284
285
const deployStackResult = await hotswapMockSdkProvider . tryHotswapDeployment ( cdkStackArtifact , { AssetParam2 : 'asset-param-2' } ) ;
285
286
286
287
// THEN
287
288
expect ( deployStackResult ) . not . toBeUndefined ( ) ;
288
289
expect ( mockUpdateMachineDefinition ) . toHaveBeenCalledWith ( {
289
290
definition : 'asset-param-2' ,
290
- stateMachineArn : 'machine-name' ,
291
+ stateMachineArn : 'arn:aws:states:here:123456789012:stateMachine: machine-name' ,
291
292
} ) ;
292
293
} ) ;
293
294
@@ -348,7 +349,7 @@ test('calls the updateStateMachine() API when it receives a change to the defini
348
349
349
350
// WHEN
350
351
setup . pushStackResourceSummaries (
351
- setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'mock -machine-resource-id ' ) ,
352
+ setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'arn:aws:states:here:123456789012:stateMachine:my -machine' ) ,
352
353
setup . stackSummaryOf ( 'Func' , 'AWS::Lambda::Function' , 'my-func' ) ,
353
354
) ;
354
355
const deployStackResult = await hotswapMockSdkProvider . tryHotswapDeployment ( cdkStackArtifact ) ;
@@ -357,7 +358,7 @@ test('calls the updateStateMachine() API when it receives a change to the defini
357
358
expect ( deployStackResult ) . not . toBeUndefined ( ) ;
358
359
expect ( mockUpdateMachineDefinition ) . toHaveBeenCalledWith ( {
359
360
definition : '"Resource": arn:aws:lambda:here:123456789012:function:my-func' ,
360
- stateMachineArn : 'my-machine' ,
361
+ stateMachineArn : 'arn:aws:states:here:123456789012:stateMachine: my-machine' ,
361
362
} ) ;
362
363
} ) ;
363
364
@@ -446,7 +447,7 @@ test("will not perform a hotswap deployment if it doesn't know how to handle a s
446
447
} ,
447
448
} ) ;
448
449
setup . pushStackResourceSummaries (
449
- setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'my-machine' ) ,
450
+ setup . stackSummaryOf ( 'Machine' , 'AWS::StepFunctions::StateMachine' , 'arn:aws:states:here:123456789012:stateMachine: my-machine' ) ,
450
451
setup . stackSummaryOf ( 'Bucket' , 'AWS::S3::Bucket' , 'my-bucket' ) ,
451
452
) ;
452
453
const cdkStackArtifact = setup . cdkStackArtifactOf ( {
0 commit comments