Skip to content

Commit 192b95a

Browse files
committed
see if tests work
1 parent 0c7d002 commit 192b95a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

test/api.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ suite(`AzureFunctionsExtensionApi`, () => {
9292
});
9393
});
9494

95-
const validateOptions: IValidateProjectOptions = getCSharpValidateOptions('net6.0', FuncVersion.v4);
95+
const validateOptions: IValidateProjectOptions = getCSharpValidateOptions('net6.0', FuncVersion.v4, 1, projectSubpath, workspaceFolder);
96+
// Exclude .git because the test workspace folders are already inside a git repo so we don't do git init.
97+
validateOptions.excludedPaths?.push('.git');
9698
await validateProject(folderPath, validateOptions);
9799
});
98100

test/project/validateProject.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,25 @@ export function getTypeScriptValidateOptions(options?: { version?: FuncVersion,
8181
return result;
8282
}
8383

84-
export function getCSharpValidateOptions(targetFramework: string, version: FuncVersion = defaultTestFuncVersion, numCsproj: number = 1): IValidateProjectOptions {
84+
export function getCSharpValidateOptions(targetFramework: string, version: FuncVersion = defaultTestFuncVersion, numCsproj: number = 1, projectSubpath?: string, workspaceFolder?: string): IValidateProjectOptions {
8585
return {
8686
language: ProjectLanguage.CSharp,
8787
version,
8888
expectedSettings: {
8989
'azureFunctions.projectLanguage': ProjectLanguage.CSharp,
9090
'azureFunctions.projectRuntime': version,
9191
'azureFunctions.preDeployTask': 'publish (functions)',
92-
'azureFunctions.deploySubpath': `bin/Release/${targetFramework}/publish`,
92+
'azureFunctions.deploySubpath': path.join(projectSubpath ?? '', `bin/Release/${targetFramework}/publish`),
9393
'debug.internalConsoleOptions': 'neverOpen',
9494
},
9595
expectedPaths: [
96-
{ globPattern: '*.csproj', numMatches: numCsproj }
96+
{ globPattern: path.join(projectSubpath ?? '', '*.csproj'), numMatches: numCsproj }
9797
],
9898
expectedExtensionRecs: [
9999
'ms-dotnettools.csharp'
100100
],
101101
excludedPaths: [
102-
'.funcignore'
102+
path.join(projectSubpath ?? '', '.funcignore')
103103
],
104104
expectedDebugConfigs: [
105105
'Attach to .NET Functions'
@@ -110,7 +110,8 @@ export function getCSharpValidateOptions(targetFramework: string, version: FuncV
110110
'clean release (functions)',
111111
'publish (functions)',
112112
'host start'
113-
]
113+
],
114+
workspaceFolder
114115
};
115116
}
116117

0 commit comments

Comments
 (0)