Fixing deleteDatabaseReference test for vscode-mssql (#23008)

This commit is contained in:
Benjin Dubishar
2023-05-07 13:08:04 -07:00
committed by GitHub
parent 688b0c0819
commit 1620b3b374
3 changed files with 5 additions and 5 deletions

View File

@@ -420,7 +420,7 @@ export function circularProjectReference(project1: string, project2: string) { r
export function errorFindingBuildFilesLocation(err: any) { return localize('errorFindingBuildFilesLocation', "Error finding build files location: {0}", utils.getErrorMessage(err)); }
export function projBuildFailed(errorMessage: string) { return localize('projBuildFailed', "Build failed. Check output pane for more details. {0}", errorMessage); }
export function unexpectedProjectContext(uri: string) { return localize('unexpectedProjectContext', "Unable to establish project context. Command invoked from unexpected location: {0}", uri); }
export function unableToPerformAction(action: string, uri: string) { return localize('unableToPerformAction', "Unable to locate '{0}' target: '{1}'", action, uri); }
export function unableToPerformAction(action: string, uri: string, error?: string) { return localize('unableToPerformAction', "Unable to locate '{0}' target: '{1}'. {2}", action, uri, error); }
export function unableToFindObject(path: string, objType: string) { return localize('unableToFindFile', "Unable to find {1} with path '{0}'", path, objType); }
export function deployScriptExists(scriptType: string) { return localize('deployScriptExists', "A {0} script already exists. The new script will not be included in build.", scriptType); }
export function cantAddCircularProjectReference(project: string) { return localize('cantAddCircularProjectReference', "A reference to project '{0}' cannot be added. Adding this project as a reference would cause a circular dependency", project); }

View File

@@ -888,12 +888,12 @@ export class ProjectsController {
.send();
this.refreshProjectsTree(context);
} catch {
} catch (err) {
TelemetryReporter.createErrorEvent2(TelemetryViews.ProjectTree, TelemetryActions.deleteObjectFromProject)
.withAdditionalProperties({ objectType: node.constructor.name })
.send();
void vscode.window.showErrorMessage(constants.unableToPerformAction(constants.deleteAction, node.relativeProjectUri.path));
void vscode.window.showErrorMessage(constants.unableToPerformAction(constants.deleteAction, node.relativeProjectUri.path, utils.getErrorMessage(err)));
}
}

View File

@@ -502,9 +502,9 @@ declare module 'vscode-mssql' {
/**
* Delete a database reference from a project
* @param projectUri Absolute path of the project, including .sqlproj
* @param path Path of the script, including .sql, relative to the .sqlproj
* @param name Name of the reference to be deleted. Name of the System DB, path of the sqlproj, or path of the dacpac
*/
deleteDatabaseReference(projectUri: string, path: string): Promise<ResultStatus>;
deleteDatabaseReference(projectUri: string, name: string): Promise<ResultStatus>;
/**
* Add a folder to a project