Required changes to make sql projects extension work with vscode (#22847)

* Update CreateProject api

* More updates

* Fix a few comments

* Address comments

* Remove package.json changes

* Fix error

* Fix testUtil
This commit is contained in:
Sakshi Sharma
2023-04-28 10:27:59 -07:00
committed by GitHub
parent c04b8af1d2
commit 757067b132
11 changed files with 115 additions and 40 deletions

View File

@@ -13,8 +13,9 @@ import should = require('should');
import { AssertionError } from 'assert';
import { Project } from '../models/project';
import { Uri } from 'vscode';
import { exists, getSqlProjectsService } from '../common/utils';
import { ProjectType } from 'mssql';
import { exists, getAzdataApi, getSqlProjectsService } from '../common/utils';
import * as mssql from 'mssql';
import * as vscodeMssql from 'vscode-mssql';
export async function shouldThrowSpecificError(block: Function, expectedMessage: string, details?: string) {
let succeeded = false;
@@ -33,7 +34,7 @@ export async function shouldThrowSpecificError(block: Function, expectedMessage:
export async function createTestSqlProject(test: Mocha.Runnable | undefined): Promise<Project> {
const projPath = await getTestProjectPath(test);
await (await getSqlProjectsService()).createProject(projPath, ProjectType.SdkStyle);
await (await getSqlProjectsService() as mssql.ISqlProjectsService).createProject(projPath, mssql.ProjectType.SdkStyle);
return await Project.openProject(projPath);
}