mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
SQL Database Project - Deploy db to docker (#16406)
Added a new command to deploy the project to docker
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user