Adds SQL Binding Create Azure Function with SQL Binding tests (#19538)

* add a couple of azure function service tests

* address comments

* use mock for azureFunctionExtensionAPI
This commit is contained in:
Vasu Bhog
2022-05-31 21:04:39 -04:00
committed by GitHub
parent aeb1e776d4
commit 6c7a8313b2
6 changed files with 420 additions and 177 deletions

View File

@@ -458,7 +458,6 @@ export async function promptAndUpdateConnectionStringSetting(projectUri: vscode.
continue;
}
const listOfConnectionStringMethods = [constants.connectionProfile, constants.userConnectionString];
let selectedConnectionStringMethod: string | undefined;
let connectionString: string | undefined = '';
while (true) {
@@ -467,6 +466,7 @@ export async function promptAndUpdateConnectionStringSetting(projectUri: vscode.
const localSettingsPath: string = path.join(projectFolder, constants.azureFunctionLocalSettingsFileName);
if (!connectionInfo) {
const listOfConnectionStringMethods = [constants.connectionProfile, constants.userConnectionString];
// show the connection string methods (user input and connection profile options)
selectedConnectionStringMethod = await vscode.window.showQuickPick(listOfConnectionStringMethods, {
canPickMany: false,
@@ -509,7 +509,6 @@ export async function promptAndUpdateConnectionStringSetting(projectUri: vscode.
// user cancelled the prompts
return;
}
const success = await setLocalAppSetting(projectFolder, newConnectionStringSettingName, connectionString);
if (success) {
// exit both loops and insert binding