diff --git a/src/utils.js b/src/utils.js index 9407693..1af6924 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1011,7 +1011,7 @@ function createActionObject (fullName, manifestAction) { if (manifestAction.limits) { const concurrencyLimit = manifestAction.limits.concurrentActivations || manifestAction.limits.concurrency objAction.limits = { - memory: manifestAction.limits.memorySize || 256, + memory: manifestAction.limits.memorySize || manifestAction.limits.memory || 256, logs: manifestAction.limits.logSize || 10, timeout: manifestAction.limits.timeout || 60000 } diff --git a/test/utils.test.js b/test/utils.test.js index 944b7f3..3b66df1 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -626,6 +626,14 @@ describe('createActionObject', () => { function: 'fake.js', runtime: 'something' } + test('action supported limits alternative name memory', () => { + manifestAction.limits = { + memory: 1 + } + readFileSyncSpy.mockImplementation(() => 'some source code') + const res = utils.createActionObject('fake', manifestAction) + expect(res.limits.memory).toEqual(1) + }) test('action supported limits, concurrentActivations set', () => { manifestAction.limits = { memorySize: 1,