From 9e412259392b71466ce1aa17c187290c88b5ca1f Mon Sep 17 00:00:00 2001 From: rsonghuster Date: Thu, 15 Aug 2024 20:53:37 +0800 Subject: [PATCH] fix it with export REGION --- __tests__/it/integration_test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/__tests__/it/integration_test.ts b/__tests__/it/integration_test.ts index 67439b8..ceacf0c 100644 --- a/__tests__/it/integration_test.ts +++ b/__tests__/it/integration_test.ts @@ -73,10 +73,11 @@ describe('Integration Tests', () => { test('deploy event function', async () => { const output = await myFcInstance.deploy(inputs); + const region = process.env.REGION || 'cn-huhehaote'; expect(output).toEqual({ - region: process.env.REGION || 'cn-huhehaote', + region, description: 'hello world by serverless devs', - functionArn: 'acs:fc:cn-huhehaote:1431999136518149:functions/start-py', + functionArn: `acs:fc:${region}:1431999136518149:functions/start-py`, functionName: 'start-py', handler: 'index.handler', internetAccess: true, @@ -105,10 +106,11 @@ describe('Integration Tests', () => { const output = await myFcInstance.deploy(inputs_http); removeNullValues(output); delete output['url']; + const region = process.env.REGION || 'cn-huhehaote'; expect(output).toEqual({ - region: process.env.REGION || 'cn-huhehaote', + region, description: 'hello world by serverless devs', - functionArn: 'acs:fc:cn-huhehaote:1431999136518149:functions/start-py', + functionArn: `acs:fc:${region}:1431999136518149:functions/start-py`, functionName: 'start-py', handler: 'index.handler', internetAccess: true,