Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
awsluja committed Nov 25, 2024
1 parent aa19bc1 commit 5f94c7f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('dotnet function tests', () => {
const assertDotNetVersion = (): void => {
const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName);
const { functionRuntime } = JSONUtilities.readJson<any>(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('<TargetFramework>net6.0</TargetFramework>');
Expand All @@ -56,7 +56,7 @@ describe('dotnet function tests', () => {
name: funcName,
functionTemplate: 'Hello World',
},
'dotnet6',
'dotnet8',
);
await functionMockAssert(projRoot, {
funcName,
Expand All @@ -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);
Expand All @@ -91,7 +91,7 @@ describe('dotnet function tests', () => {
name: funcName,
functionTemplate: 'Serverless',
},
'dotnet6',
'dotnet8',
);
await functionMockAssert(projRoot, {
funcName,
Expand All @@ -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({
Expand All @@ -135,7 +135,7 @@ describe('dotnet function tests', () => {
triggerType: 'DynamoDB',
eventSource: 'DynamoDB',
},
'dotnet6',
'dotnet8',
addLambdaTrigger, // Adds DDB trigger by default
);
await functionMockAssert(projRoot, {
Expand All @@ -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, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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':
Expand Down

0 comments on commit 5f94c7f

Please sign in to comment.