@@ -14,15 +14,15 @@ void describe('AmplifyStorage', () => {
1414 void it ( 'creates a bucket' , ( ) => {
1515 const app = new App ( ) ;
1616 const stack = new Stack ( app ) ;
17- new AmplifyStorage ( stack , 'test' , { } ) ;
17+ new AmplifyStorage ( stack , 'test' , { name : 'testName' } ) ;
1818 const template = Template . fromStack ( stack ) ;
1919 template . resourceCountIs ( 'AWS::S3::Bucket' , 1 ) ;
2020 } ) ;
2121
2222 void it ( 'turns versioning on if specified' , ( ) => {
2323 const app = new App ( ) ;
2424 const stack = new Stack ( app ) ;
25- new AmplifyStorage ( stack , 'test' , { versioned : true } ) ;
25+ new AmplifyStorage ( stack , 'test' , { versioned : true , name : 'testName' } ) ;
2626 const template = Template . fromStack ( stack ) ;
2727 template . resourceCountIs ( 'AWS::S3::Bucket' , 1 ) ;
2828 template . hasResourceProperties ( 'AWS::S3::Bucket' , {
@@ -33,7 +33,7 @@ void describe('AmplifyStorage', () => {
3333 void it ( 'stores attribution data in stack' , ( ) => {
3434 const app = new App ( ) ;
3535 const stack = new Stack ( app ) ;
36- new AmplifyStorage ( stack , 'testAuth' , { } ) ;
36+ new AmplifyStorage ( stack , 'testAuth' , { name : 'testName' } ) ;
3737
3838 const template = Template . fromStack ( stack ) ;
3939 assert . equal (
@@ -54,11 +54,12 @@ void describe('AmplifyStorage', () => {
5454 } ;
5555
5656 const storageConstruct = new AmplifyStorage ( stack , 'test' , {
57+ name : 'testName' ,
5758 outputStorageStrategy : storageStrategy ,
5859 } ) ;
5960
6061 const expectedBucketName = (
61- storageConstruct . node . findChild ( 'testBucket ' ) as Bucket
62+ storageConstruct . node . findChild ( 'Bucket ' ) as Bucket
6263 ) . bucketName ;
6364 const expectedRegion = Stack . of ( storageConstruct ) . region ;
6465
@@ -80,7 +81,7 @@ void describe('AmplifyStorage', () => {
8081 const app = new App ( ) ;
8182 const stack = new Stack ( app ) ;
8283
83- new AmplifyStorage ( stack , 'test' , { } ) ;
84+ new AmplifyStorage ( stack , 'test' , { name : 'testName' } ) ;
8485 const template = Template . fromStack ( stack ) ;
8586 template . templateMatches ( {
8687 Metadata : {
0 commit comments