Add Azure Function Service Error/Cancel tests (#19758)

* cleanup tests

* exit/error scenario tests

* remove + from manuallyEnterObjectName

* address comments

* add resolve for writeFile
This commit is contained in:
Vasu Bhog
2022-06-20 15:48:38 -07:00
committed by GitHub
parent 0aadd317fa
commit c5093dbb5a
8 changed files with 151 additions and 39 deletions

View File

@@ -680,7 +680,7 @@ export async function promptSelectTable(connectionURI: string, bindingType: Bind
// Get schema and table names from query result rows
const tableNames = queryResult!.rows.map(r => r[0].displayValue);
// add manual entry option to table names list for user to choose from as well (with pencil icon)
let manuallyEnterObjectName = '$(pencil) ' + userObjectName;
let manuallyEnterObjectName = constants.manuallyEnterObjectName(userObjectName);
tableNames.unshift(manuallyEnterObjectName);
// prompt user to select table from list of tables options
while (true) {

View File

@@ -84,3 +84,4 @@ export function settingAlreadyExists(settingName: string): string { return local
export function failedToParse(filename: string, error: any): string { return localize('failedToParse', 'Failed to parse "{0}": {1}.', filename, utils.getErrorMessage(error)); }
export function addSqlBinding(functionName: string): string { return localize('addSqlBinding', 'Adding SQL Binding to function "{0}"...'), functionName; }
export function errorNewAzureFunction(error: any): string { return localize('errorNewAzureFunction', 'Error creating new Azure Function: {0}', utils.getErrorMessage(error)); }
export function manuallyEnterObjectName(userObjectName: string): string { return `$(pencil) ${userObjectName}`; }