SQL Database Project - Deploy db to docker (#16406)

Added a new command to deploy the project to docker
This commit is contained in:
Leila Lali
2021-08-12 13:24:16 -07:00
committed by GitHub
parent 57e11c7b5c
commit 32a71a2de6
18 changed files with 1111 additions and 92 deletions

View File

@@ -13,17 +13,24 @@ import { NetCoreTool, DBProjectConfigurationKey, NetCoreInstallLocationKey, NetC
import { getQuotedPath } from '../common/utils';
import { isNullOrUndefined } from 'util';
import { generateTestFolderPath } from './testUtils';
import { createContext, TestContext } from './testContext';
let testContext: TestContext;
describe('NetCoreTool: Net core tests', function (): void {
afterEach(function (): void {
sinon.restore();
});
beforeEach(function (): void {
testContext = createContext();
});
it('Should override dotnet default value with settings', async function (): Promise<void> {
try {
// update settings and validate
await vscode.workspace.getConfiguration(DBProjectConfigurationKey).update(NetCoreInstallLocationKey, 'test value path', true);
const netcoreTool = new NetCoreTool();
const netcoreTool = new NetCoreTool(testContext.outputChannel);
sinon.stub(netcoreTool, 'showInstallDialog').returns(Promise.resolve());
should(netcoreTool.netcoreInstallLocation).equal('test value path'); // the path in settings should be taken
should(await netcoreTool.findOrInstallNetCore()).equal(false); // dotnet can not be present at dummy path in settings
@@ -35,7 +42,7 @@ describe('NetCoreTool: Net core tests', function (): void {
});
it('Should find right dotnet default paths', async function (): Promise<void> {
const netcoreTool = new NetCoreTool();
const netcoreTool = new NetCoreTool(testContext.outputChannel);
sinon.stub(netcoreTool, 'showInstallDialog').returns(Promise.resolve());
await netcoreTool.findOrInstallNetCore();
@@ -53,7 +60,7 @@ describe('NetCoreTool: Net core tests', function (): void {
});
it('should run a command successfully', async function (): Promise<void> {
const netcoreTool = new NetCoreTool();
const netcoreTool = new NetCoreTool(testContext.outputChannel);
const dummyFile = path.join(await generateTestFolderPath(), 'dummy.dacpac');
const outputChannel = vscode.window.createOutputChannel('db project test');