File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class Asset extends cdk.Construct {
9999 const s3Filename = new cdk . FnSelect ( 1 , new cdk . FnSplit ( cxapi . ASSET_PREFIX_SEPARATOR , keyParam . value ) ) ;
100100 this . s3ObjectKey = new s3 . ObjectKey ( new cdk . FnConcat ( this . s3Prefix , s3Filename ) ) ;
101101
102- this . bucket = s3 . BucketRef . import ( parent , 'AssetBucket' , {
102+ this . bucket = s3 . BucketRef . import ( this , 'AssetBucket' , {
103103 bucketName : this . s3BucketName
104104 } ) ;
105105
Original file line number Diff line number Diff line change @@ -98,5 +98,18 @@ export = {
9898 path : '/path/not/found/' + Math . random ( ) * 999999
9999 } ) ) ;
100100 test . done ( ) ;
101- }
101+ } ,
102+
103+ 'multiple assets under the same parent' ( test : Test ) {
104+ // GIVEN
105+ const stack = new cdk . Stack ( ) ;
106+
107+ // WHEN
108+ new ZipDirectoryAsset ( stack , 'MyDirectory1' , { path : '.' } ) ;
109+ new ZipDirectoryAsset ( stack , 'MyDirectory2' , { path : '.' } ) ;
110+
111+ // THEN: no error
112+
113+ test . done ( ) ;
114+ } ,
102115} ;
You can’t perform that action at this time.
0 commit comments