🎥 Make videos programmatically with React
fix unit test failing after ephemereal storage increase
Jonny Burgerd7b7c6c21921
diff --git a/packages/lambda/src/test/integration/deploy-function.test.ts b/packages/lambda/src/test/integration/deploy-function.test.tsindex 0357851926..4f48ae9e78 100644--- a/packages/lambda/src/test/integration/deploy-function.test.ts+++ b/packages/lambda/src/test/integration/deploy-function.test.ts@@ -5,7 +5,10 @@ import {cleanFnStore,markFunctionAsIncompatible,} from '../../api/mock-functions';-import {CURRENT_VERSION} from '../../shared/constants';+import {+ CURRENT_VERSION,+ DEFAULT_EPHEMERAL_STORAGE_IN_MB,+} from '../../shared/constants';const expectedFunctionName = (memory: number, timeout: number, disk: number) =>`remotion-render-${CURRENT_VERSION}-mem${memory}mb-disk${disk}mb-${timeout}sec`;@@ -18,7 +21,9 @@ test('Should be able to deploy function', async () => {createCloudWatchLogGroup: true,architecture: 'arm64',});- expect(functionName).toBe(expectedFunctionName(2048, 120, 512));+ expect(functionName).toBe(+ expectedFunctionName(2048, 120, DEFAULT_EPHEMERAL_STORAGE_IN_MB)+ );});test('Should be able to get the function afterwards', async () => {@@ -31,14 +36,20 @@ test('Should be able to get the function afterwards', async () => {createCloudWatchLogGroup: true,architecture: 'arm64',});- expect(functionName).toBe(expectedFunctionName(2048, 120, 512));+ expect(functionName).toBe(+ expectedFunctionName(2048, 120, DEFAULT_EPHEMERAL_STORAGE_IN_MB)+ );const fns = await getFunctions({region: 'us-east-1',compatibleOnly: true,});expect(fns).toEqual([{- functionName: expectedFunctionName(2048, 120, 512),+ functionName: expectedFunctionName(+ 2048,+ 120,+ DEFAULT_EPHEMERAL_STORAGE_IN_MB+ ),memorySizeInMb: 2048,timeoutInSeconds: 120,version: CURRENT_VERSION,@@ -63,10 +74,16 @@ test('Should be able to delete the function', async () => {createCloudWatchLogGroup: true,architecture: 'arm64',});- expect(functionName).toBe(expectedFunctionName(2048, 120, 512));+ expect(functionName).toBe(+ expectedFunctionName(2048, 120, DEFAULT_EPHEMERAL_STORAGE_IN_MB)+ );await deleteFunction({region: 'us-east-1',- functionName: expectedFunctionName(2048, 120, 512),+ functionName: expectedFunctionName(+ 2048,+ 120,+ DEFAULT_EPHEMERAL_STORAGE_IN_MB+ ),});const fns = await getFunctions({region: 'us-east-1',@@ -85,14 +102,20 @@ test('Should be able to get the function afterwards', async () => {createCloudWatchLogGroup: true,architecture: 'arm64',});- expect(functionName).toBe(expectedFunctionName(2048, 120, 512));+ expect(functionName).toBe(+ expectedFunctionName(2048, 120, DEFAULT_EPHEMERAL_STORAGE_IN_MB)+ );const fns = await getFunctions({region: 'us-east-1',compatibleOnly: true,});expect(fns).toEqual([{- functionName: expectedFunctionName(2048, 120, 512),+ functionName: expectedFunctionName(+ 2048,+ 120,+ DEFAULT_EPHEMERAL_STORAGE_IN_MB+ ),memorySizeInMb: 2048,timeoutInSeconds: 120,version: CURRENT_VERSION,@@ -100,7 +123,9 @@ test('Should be able to get the function afterwards', async () => {diskSizeInMb: 512,},]);- markFunctionAsIncompatible(expectedFunctionName(2048, 120, 512));+ markFunctionAsIncompatible(+ expectedFunctionName(2048, 120, DEFAULT_EPHEMERAL_STORAGE_IN_MB)+ );const compatibleFns = await getFunctions({region: 'us-east-1',compatibleOnly: true,@@ -112,7 +137,11 @@ test('Should be able to get the function afterwards', async () => {expect(compatibleFns).toEqual([]);expect(incompatibleFns).toEqual([{- functionName: expectedFunctionName(2048, 120, 512),+ functionName: expectedFunctionName(+ 2048,+ 120,+ DEFAULT_EPHEMERAL_STORAGE_IN_MB+ ),memorySizeInMb: 2048,timeoutInSeconds: 120,version: '2021-06-23',