Database projects deploy (#10417)

* Hooking up deployment of SQL projects to the project build functionality and database selection UI
* Adding ADS-side plumbing for sqlcmdvars
This commit is contained in:
Benjin Dubishar
2020-05-26 14:28:09 -07:00
committed by GitHub
parent 690e3c582c
commit f0d86f8acb
14 changed files with 340 additions and 88 deletions

View File

@@ -10,6 +10,7 @@ import * as constants from '../common/constants';
import { promises as fs } from 'fs';
import should = require('should');
import { AssertionError } from 'assert';
import { Project } from '../models/project';
export async function shouldThrowSpecificError(block: Function, expectedMessage: string, details?: string) {
let succeeded = false;
@@ -26,10 +27,14 @@ export async function shouldThrowSpecificError(block: Function, expectedMessage:
}
}
export async function createTestSqlProj(contents: string, folderPath?: string): Promise<string> {
export async function createTestSqlProjFile(contents: string, folderPath?: string): Promise<string> {
return await createTestFile(contents, 'TestProject.sqlproj', folderPath);
}
export async function createTestProject(contents: string, folderPath?: string): Promise<Project> {
return new Project(await createTestSqlProjFile(contents, folderPath));
}
export async function createTestDataSources(contents: string, folderPath?: string): Promise<string> {
return await createTestFile(contents, constants.dataSourcesFileName, folderPath);
}