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

@@ -113,13 +113,13 @@ export async function createAzureFunction(node?: ITreeNodeInfo): Promise<void> {
// Get connection string parameters and construct object name from prompt or connectionInfo given
let objectName: string | undefined;
const vscodeMssqlApi = await utils.getVscodeMssqlApi();
if (!node) {
// if user selects command in command palette we prompt user for information
telemetryStep = CreateAzureFunctionStep.launchFromCommandPalette;
// prompt user for connection profile to get connection info
while (true) {
try {
const vscodeMssqlApi = await utils.getVscodeMssqlApi();
connectionInfo = await vscodeMssqlApi.promptForConnection(true);
} catch (e) {
// user cancelled while creating connection profile