From 8db2f4cbc56a46110d82e3d36e8a63f50e06d495 Mon Sep 17 00:00:00 2001 From: Himanshu Pant Date: Tue, 7 Mar 2023 13:51:55 +0530 Subject: [PATCH] fix(AWS Lambda): Fix `runtimeManagment` handling (#11778) --- lib/plugins/aws/package/compile/functions.js | 2 +- test/unit/lib/plugins/aws/package/compile/functions.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/aws/package/compile/functions.js b/lib/plugins/aws/package/compile/functions.js index 85188a7f6..ddd8c7724 100644 --- a/lib/plugins/aws/package/compile/functions.js +++ b/lib/plugins/aws/package/compile/functions.js @@ -27,7 +27,7 @@ const defaultCors = { }; const runtimeManagementMap = new Map([ ['auto', 'Auto'], - ['onFunctionUpdate', 'Function update'], + ['onFunctionUpdate', 'FunctionUpdate'], ['manual', 'Manual'], ]); diff --git a/test/unit/lib/plugins/aws/package/compile/functions.test.js b/test/unit/lib/plugins/aws/package/compile/functions.test.js index 8e5c28ab1..08fb576dd 100644 --- a/test/unit/lib/plugins/aws/package/compile/functions.test.js +++ b/test/unit/lib/plugins/aws/package/compile/functions.test.js @@ -1351,7 +1351,7 @@ describe('lib/plugins/aws/package/compile/functions/index.test.js', () => { const { UpdateRuntimeOn } = cfResources[naming.getLambdaLogicalId('foo')].Properties.RuntimeManagementConfig; - expect(UpdateRuntimeOn).to.equal('Function update'); + expect(UpdateRuntimeOn).to.equal('FunctionUpdate'); }); it('should support `provider.versionFunctions: false`', () => {