@@ -817,12 +817,12 @@ aws_secret_access_key = CUSTOMSECRET
817
817
} ,
818
818
} ,
819
819
} ,
820
- } ) ,
820
+ } )
821
821
) . to . be . eventually . rejected . and . have . property (
822
822
'code' ,
823
- 'ECR_IMAGE_URI_AND_BUILDOPTIONS_DEFINED_ERROR' ,
824
- )
825
- } )
823
+ 'ECR_IMAGE_URI_AND_BUILDOPTIONS_DEFINED_ERROR'
824
+ ) ;
825
+ } ) ;
826
826
827
827
it ( 'should fail if `functions[].image` references image with both path and uri' , async ( ) => {
828
828
await expect (
@@ -1688,7 +1688,7 @@ aws_secret_access_key = CUSTOMSECRET
1688
1688
] ) ;
1689
1689
} ) ;
1690
1690
1691
- t ( 'should work correctly when image is defined with `buildOptions` set' , async ( ) => {
1691
+ it ( 'should work correctly when image is defined with `buildOptions` set' , async ( ) => {
1692
1692
const awsRequestStubMap = {
1693
1693
...baseAwsRequestStubMap ,
1694
1694
ECR : {
@@ -1698,7 +1698,7 @@ aws_secret_access_key = CUSTOMSECRET
1698
1698
} ) ,
1699
1699
createRepository : createRepositoryStub ,
1700
1700
} ,
1701
- }
1701
+ } ;
1702
1702
const {
1703
1703
awsNaming,
1704
1704
cfTemplate,
@@ -1721,23 +1721,20 @@ aws_secret_access_key = CUSTOMSECRET
1721
1721
} ,
1722
1722
} ,
1723
1723
} ,
1724
- } )
1724
+ } ) ;
1725
1725
1726
- const functionCfLogicalId = awsNaming . getLambdaLogicalId ( 'foo' )
1727
- const functionCfConfig =
1728
- cfTemplate . Resources [ functionCfLogicalId ] . Properties
1726
+ const functionCfLogicalId = awsNaming . getLambdaLogicalId ( 'foo' ) ;
1727
+ const functionCfConfig = cfTemplate . Resources [ functionCfLogicalId ] . Properties ;
1729
1728
const versionCfConfig = Object . values ( cfTemplate . Resources ) . find (
1730
1729
( resource ) =>
1731
1730
resource . Type === 'AWS::Lambda::Version' &&
1732
- resource . Properties . FunctionName . Ref === functionCfLogicalId ,
1733
- ) . Properties
1734
-
1735
- expect ( functionCfConfig . Code . ImageUri ) . to . deep . equal (
1736
- `${ repositoryUri } @sha256:${ imageSha } ` ,
1737
- )
1738
- expect ( versionCfConfig . CodeSha256 ) . to . equal ( imageSha )
1739
- expect ( describeRepositoriesStub ) . to . be . calledOnce
1740
- expect ( createRepositoryStub . notCalled ) . to . be . true
1731
+ resource . Properties . FunctionName . Ref === functionCfLogicalId
1732
+ ) . Properties ;
1733
+
1734
+ expect ( functionCfConfig . Code . ImageUri ) . to . deep . equal ( `${ repositoryUri } @sha256:${ imageSha } ` ) ;
1735
+ expect ( versionCfConfig . CodeSha256 ) . to . equal ( imageSha ) ;
1736
+ expect ( describeRepositoriesStub ) . to . be . calledOnce ;
1737
+ expect ( createRepositoryStub . notCalled ) . to . be . true ;
1741
1738
expect ( spawnExtStub ) . to . be . calledWith ( 'docker' , [
1742
1739
'build' ,
1743
1740
'-t' ,
@@ -1747,7 +1744,7 @@ aws_secret_access_key = CUSTOMSECRET
1747
1744
'--ssh' ,
1748
1745
'default=/path/to/file' ,
1749
1746
'./' ,
1750
- ] )
1747
+ ] ) ;
1751
1748
} ) ;
1752
1749
1753
1750
it ( 'should work correctly when image is defined with `buildArgs` set' , async ( ) => {
0 commit comments