Skip to content

Commit d580c4a

Browse files
authored
Fix tests and temporarily disable ones that fail due to service (#4472)
* Update tests * Update tests * Change powershell input * Temporarily disable tests that fail due to service * Revert local long running flag * Oopsie daisy
1 parent 2b1d859 commit d580c4a

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

test/nightly/createProjectAndDeploy.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,32 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils';
1010
import * as assert from 'assert';
1111
import * as path from 'path';
1212
import * as vscode from 'vscode';
13-
import { FuncVersion, ProjectLanguage, copyFunctionUrl, createGenericClient, createNewProjectInternal, deployProductionSlot, getRandomAlphanumericString, getRandomHexString, nonNullProp } from '../../extension.bundle';
13+
import { ProjectLanguage, copyFunctionUrl, createGenericClient, createNewProjectInternal, deployProductionSlot, getRandomAlphanumericString, getRandomHexString, nonNullProp } from '../../extension.bundle';
1414
import { addParallelSuite, runInSeries, type ParallelTest } from '../addParallelSuite';
1515
import { getTestWorkspaceFolder } from '../global.test';
16-
import { NodeModelVersion, PythonModelVersion, defaultTestFuncVersion, getCSharpValidateOptions, getJavaScriptValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, validateProject, type IValidateProjectOptions } from '../project/validateProject';
16+
import { NodeModelVersion, PythonModelVersion, defaultTestFuncVersion, getJavaScriptValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, validateProject, type IValidateProjectOptions } from '../project/validateProject';
1717
import { getRotatingAuthLevel, getRotatingLocation, getRotatingNodeVersion, getRotatingPythonVersion } from './getRotatingValue';
1818
import { resourceGroupsToDelete } from './global.nightly.test';
1919

2020
interface CreateProjectAndDeployTestCase extends ICreateProjectAndDeployOptions {
2121
title: string;
2222
buildMachineOsToSkip?: NodeJS.Platform | NodeJS.Platform[];
2323
}
24+
const confirmDeploy = 'Deploy';
2425

2526
const testCases: CreateProjectAndDeployTestCase[] = [
26-
{ title: 'JavaScript', ...getJavaScriptValidateOptions(true, undefined, undefined, undefined), deployInputs: [getRotatingNodeVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/], languageModelVersion: NodeModelVersion.v4 },
27-
{ title: 'TypeScript', ...getTypeScriptValidateOptions(), deployInputs: [getRotatingNodeVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/], languageModelVersion: NodeModelVersion.v4 },
27+
{ title: 'JavaScript', ...getJavaScriptValidateOptions(true, undefined, undefined, undefined, NodeModelVersion.v4), deployInputs: [getRotatingNodeVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/, confirmDeploy], languageModelVersion: NodeModelVersion.v4 },
28+
{ title: 'TypeScript', ...getTypeScriptValidateOptions({ modelVersion: NodeModelVersion.v4 }), deployInputs: [getRotatingNodeVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/, confirmDeploy], languageModelVersion: NodeModelVersion.v4 },
2829
// Temporarily disable Ballerina tests until we can install Ballerina on the new pipelines
2930
// https://github.com/microsoft/vscode-azurefunctions/issues/4210
3031
// { title: 'Ballerina', ...getBallerinaValidateOptions(), createProjectInputs: ["JVM"], deployInputs: [/java.*11/i] },
31-
{ title: 'C# .NET 8', ...getCSharpValidateOptions('net8.0', FuncVersion.v4), createProjectInputs: [/net.*8/i], deployInputs: [/net.*8/i, TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/], createFunctionInputs: ['Company.Function'] },
32+
// Temporarily disable .NET 8 tests due to Encountered an error (InternalServerError) from host runtime error.
33+
// { title: 'C# .NET 8', ...getCSharpValidateOptions('net8.0', FuncVersion.v4), createProjectInputs: [/net.*8/i], deployInputs: [/net.*8/i, TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/, confirmDeploy], createFunctionInputs: ['Company.Function'] },
3234
// Temporarily disable .NET 9 test for now; it seems to break after running clean release (functions)
3335
// { title: 'C# .NET 9', ...getCSharpValidateOptions('net9.0', FuncVersion.v4), createProjectInputs: [/net.*9/i], deployInputs: [/net.*9/i, TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/], createFunctionInputs: ['Company.Function'] },
34-
{ title: 'PowerShell', ...getPowerShellValidateOptions(), deployInputs: [/powershell.*7.4/i, TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/] },
35-
{ title: 'Python', ...getPythonValidateOptions('.venv', undefined), createProjectInputs: [/py/], deployInputs: [getRotatingPythonVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/], languageModelVersion: PythonModelVersion.v2 },
36+
// Temporarily disable PowerShell tests due to Encountered an error (InternalServerError) from host runtime error.
37+
// { title: 'PowerShell', ...getPowerShellValidateOptions(), deployInputs: [/powershell.*7.4/i, TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/, confirmDeploy] },
38+
{ title: 'Python', ...getPythonValidateOptions('.venv', undefined, PythonModelVersion.v2), createProjectInputs: [/py/], deployInputs: [getRotatingPythonVersion(), TestInput.UseDefaultValue /* instance mem size*/, TestInput.UseDefaultValue /*max instance*/, confirmDeploy], languageModelVersion: PythonModelVersion.v2 },
3639
]
3740

3841
const parallelTests: ParallelTest[] = [];

test/nightly/functionAppOperations.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ suite('Function App Operations', function (this: Mocha.Suite): void {
4040
});
4141

4242
test('Create - Advanced', async () => {
43-
const testInputs: (string | RegExp)[] = [appName, 'Consumption', location, /\.net/i, 'Windows', '$(plus) Create new resource group', rgName, '$(plus) Create new storage account', saName, '$(plus) Create new Application Insights resource', aiName];
43+
const testInputs: (string | RegExp)[] = [appName, 'Flex Consumption', location, /\.net/i, '4096', '100', '$(plus) Create new resource group', rgName, '$(plus) Create new storage account', saName, '$(plus) Create new Application Insights resource', aiName, '$(plus) Create new user assigned identity'];
4444
await runWithTestActionContext('createFunctionAppAdvanced', async context => {
4545
await context.ui.runWithInputs(testInputs, async () => {
4646
await createFunctionAppAdvanced(context);
@@ -51,7 +51,7 @@ suite('Function App Operations', function (this: Mocha.Suite): void {
5151
});
5252

5353
test('Create - Advanced - Existing RG/SA/AI', async () => {
54-
const testInputs: (string | RegExp)[] = [app2Name, 'Consumption', location, /\.net/i, 'Windows', rgName, saName, aiName];
54+
const testInputs: (string | RegExp)[] = [app2Name, 'Flex Consumption', location, /\.net/i, '4096', '100', rgName, saName, aiName, '$(plus) Create new user assigned identity'];
5555
await runWithTestActionContext('createFunctionAppAdvanced', async context => {
5656
await context.ui.runWithInputs(testInputs, async () => {
5757
await createFunctionAppAdvanced(context);

0 commit comments

Comments
 (0)