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 {
99
99
const s3Filename = new cdk . FnSelect ( 1 , new cdk . FnSplit ( cxapi . ASSET_PREFIX_SEPARATOR , keyParam . value ) ) ;
100
100
this . s3ObjectKey = new s3 . ObjectKey ( new cdk . FnConcat ( this . s3Prefix , s3Filename ) ) ;
101
101
102
- this . bucket = s3 . BucketRef . import ( parent , 'AssetBucket' , {
102
+ this . bucket = s3 . BucketRef . import ( this , 'AssetBucket' , {
103
103
bucketName : this . s3BucketName
104
104
} ) ;
105
105
Original file line number Diff line number Diff line change @@ -98,5 +98,18 @@ export = {
98
98
path : '/path/not/found/' + Math . random ( ) * 999999
99
99
} ) ) ;
100
100
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
+ } ,
102
115
} ;
You can’t perform that action at this time.
0 commit comments