From 5f94c7f24e0c853211bcf109869a08d664391b2e Mon Sep 17 00:00:00 2001 From: Armando Luja Date: Mon, 25 Nov 2024 12:36:06 -0800 Subject: [PATCH] chore: update tests --- .../src/__tests__/function_3b.test.ts | 14 +++++++------- .../src/migration-helpers/lambda-function.ts | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts index cb4364eb93b..02186d92fae 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts @@ -43,7 +43,7 @@ describe('dotnet function tests', () => { const assertDotNetVersion = (): void => { const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName); const { functionRuntime } = JSONUtilities.readJson(path.join(functionPath, 'amplify.state')); - expect(functionRuntime).toEqual('dotnet6'); + expect(functionRuntime).toEqual('dotnet8'); const functionProjFilePath = path.join(functionPath, 'src', `${funcName}.csproj`); const functionProjFileContent = fs.readFileSync(functionProjFilePath, 'utf8'); expect(functionProjFileContent).toContain('net6.0'); @@ -56,7 +56,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Hello World', }, - 'dotnet6', + 'dotnet8', ); await functionMockAssert(projRoot, { funcName, @@ -74,7 +74,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Hello World', }, - 'dotnet6', + 'dotnet8', ); const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; await amplifyPushAuth(projRoot); @@ -91,7 +91,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Serverless', }, - 'dotnet6', + 'dotnet8', ); await functionMockAssert(projRoot, { funcName, @@ -109,7 +109,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'CRUD function for DynamoDB (Integration with API Gateway)', }, - 'dotnet6', + 'dotnet8', createNewDynamoDBForCrudTemplate, ); const payload = JSON.stringify({ @@ -135,7 +135,7 @@ describe('dotnet function tests', () => { triggerType: 'DynamoDB', eventSource: 'DynamoDB', }, - 'dotnet6', + 'dotnet8', addLambdaTrigger, // Adds DDB trigger by default ); await functionMockAssert(projRoot, { @@ -156,7 +156,7 @@ describe('dotnet function tests', () => { functionTemplate: 'Trigger (DynamoDb, Kinesis)', triggerType: 'Kinesis', }, - 'dotnet6', + 'dotnet8', addLambdaTrigger, // Adds DDB trigger by default ); await functionMockAssert(projRoot, { diff --git a/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts b/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts index e6cf6757921..685fa2fee13 100644 --- a/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts +++ b/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts @@ -13,7 +13,7 @@ import { import _ from 'lodash'; type FunctionActions = 'create' | 'update'; -type FunctionRuntimes = 'dotnet6' | 'go' | 'java' | 'nodejs' | 'python'; +type FunctionRuntimes = 'dotnet8' | 'go' | 'java' | 'nodejs' | 'python'; type FunctionCallback = (chain: $TSAny, cwd: string, settings: $TSAny) => $TSAny; // runtimeChoices are shared between tests @@ -507,7 +507,7 @@ const addCron = (chain: ExecutionContext, settings: $TSAny) => { const getTemplateChoices = (runtime: FunctionRuntimes) => { switch (runtime) { - case 'dotnet6': + case 'dotnet8': return dotNetTemplateChoices; case 'go': return goTemplateChoices; @@ -524,8 +524,8 @@ const getTemplateChoices = (runtime: FunctionRuntimes) => { const getRuntimeDisplayName = (runtime: FunctionRuntimes) => { switch (runtime) { - case 'dotnet6': - return '.NET 6'; + case 'dotnet8': + return '.NET 8'; case 'go': return 'Go'; case 'java':