@@ -351,7 +351,7 @@ describe("RestApiGateway with mTLS and stackUUID", () => {
351351 PolicyDocument ?: {
352352 Statement ?: Array < {
353353 Action ?: Array < string >
354- Resource ?: string | Array < string >
354+ Resource ?: unknown | Array < unknown >
355355 } >
356356 }
357357 }
@@ -372,7 +372,7 @@ describe("RestApiGateway with mTLS and stackUUID", () => {
372372
373373 const apiGateway = new RestApiGateway ( stack , "TestApiGateway" , {
374374 stackName : "test-stack" ,
375- stackUUID : "f47ac10b" ,
375+ stackUUID : "f47ac10b-58cc-4372-a567-0e02b2c3d479 " ,
376376 logRetentionInDays : 30 ,
377377 mutualTlsTrustStoreKey : "truststore.pem" ,
378378 forwardCsocLogs : false ,
@@ -385,7 +385,7 @@ describe("RestApiGateway with mTLS and stackUUID", () => {
385385
386386 const template = Template . fromStack ( stack )
387387 template . hasResourceProperties ( "Custom::CDKBucketDeployment" , {
388- DestinationKeyPrefix : "cpt-api/test-stack-f47ac10b-truststore"
388+ DestinationBucketKeyPrefix : "cpt-api/test-stack-f47ac10b-58cc-4372-a567-0e02b2c3d479 -truststore"
389389 } )
390390
391391 const policies = template . findResources ( "AWS::IAM::ManagedPolicy" )
@@ -403,7 +403,13 @@ describe("RestApiGateway with mTLS and stackUUID", () => {
403403 ? statement . Resource
404404 : ( statement . Resource ? [ statement . Resource ] : [ ] )
405405
406- return resources . some ( ( resource ) => resource . includes ( expectedTrustStoreObjectPath ) )
406+ return resources . some ( ( resource ) => {
407+ if ( typeof resource === "string" ) {
408+ return resource . includes ( expectedTrustStoreObjectPath )
409+ }
410+
411+ return JSON . stringify ( resource ) . includes ( expectedTrustStoreObjectPath )
412+ } )
407413 } )
408414 } )
409415
0 commit comments