mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Add launchPublishToDockerContainerQuickpick to extension API (#19834)
* Initial * remove namespace * minor fixes
This commit is contained in:
@@ -11,13 +11,14 @@ import { DeployService } from '../../models/deploy/deployService';
|
||||
import { Project } from '../../models/project';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import { ILocalDbDeployProfile, ISqlDbDeployProfile } from '../../models/deploy/deployProfile';
|
||||
import { ISqlDbDeployProfile } from '../../models/deploy/deployProfile';
|
||||
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
||||
import * as constants from '../../common/constants';
|
||||
import { ShellExecutionHelper } from '../../tools/shellExecutionHelper';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { AzureSqlClient } from '../../models/deploy/azureSqlClient';
|
||||
import { ConnectionService } from '../../models/connections/connectionService';
|
||||
import { IPublishToDockerSettings } from 'sqldbproj';
|
||||
|
||||
export interface TestContext {
|
||||
outputChannel: vscode.OutputChannel;
|
||||
@@ -70,7 +71,7 @@ describe('deploy service', function (): void {
|
||||
|
||||
it('Should deploy a database to docker container successfully', async function (): Promise<void> {
|
||||
const testContext = createContext();
|
||||
const deployProfile: ILocalDbDeployProfile = {
|
||||
const deployProfile: IPublishToDockerSettings = {
|
||||
localDbSetting: {
|
||||
dbName: 'test',
|
||||
password: 'PLACEHOLDER',
|
||||
@@ -100,7 +101,7 @@ describe('deploy service', function (): void {
|
||||
|
||||
it('Should fail the deploy if docker is not running', async function (): Promise<void> {
|
||||
const testContext = createContext();
|
||||
const deployProfile: ILocalDbDeployProfile = {
|
||||
const deployProfile: IPublishToDockerSettings = {
|
||||
localDbSetting: {
|
||||
dbName: 'test',
|
||||
password: 'PLACEHOLDER',
|
||||
|
||||
@@ -15,10 +15,9 @@ import * as TypeMoq from 'typemoq';
|
||||
import { PublishDatabaseDialog } from '../../dialogs/publishDatabaseDialog';
|
||||
import { Project } from '../../models/project';
|
||||
import { ProjectsController } from '../../controllers/projectController';
|
||||
import { IDeploySettings } from '../../models/IDeploySettings';
|
||||
import { emptySqlDatabaseProjectTypeId } from '../../common/constants';
|
||||
import { createContext, mockDacFxOptionsResult, TestContext } from '../testContext';
|
||||
import { ILocalDbDeployProfile } from '../../models/deploy/deployProfile';
|
||||
import { IDeploySettings, IPublishToDockerSettings } from 'sqldbproj';
|
||||
|
||||
let testContext: TestContext;
|
||||
describe('Publish Database Dialog', () => {
|
||||
@@ -112,7 +111,7 @@ describe('Publish Database Dialog', () => {
|
||||
|
||||
should(profile).deepEqual(expectedGenScript);
|
||||
|
||||
const expectedContainerPublishProfile: ILocalDbDeployProfile = {
|
||||
const expectedContainerPublishProfile: IPublishToDockerSettings = {
|
||||
localDbSetting: {
|
||||
dbName: 'MockDatabaseName',
|
||||
dockerBaseImage: '',
|
||||
@@ -136,7 +135,7 @@ describe('Publish Database Dialog', () => {
|
||||
}
|
||||
};
|
||||
dialog.object.publishToExistingServer = false;
|
||||
let deployProfile: ILocalDbDeployProfile | undefined;
|
||||
let deployProfile: IPublishToDockerSettings | undefined;
|
||||
dialog.object.publishToContainer = (_, prof) => { deployProfile = prof; };
|
||||
await dialog.object.publishClick();
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ import { Project } from '../models/project';
|
||||
import { exists, convertSlashesForSqlProj, getWellKnownDatabaseSources } from '../common/utils';
|
||||
import { Uri, window } from 'vscode';
|
||||
import { IDacpacReferenceSettings, IProjectReferenceSettings, ISystemDatabaseReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||
import { ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||
import { EntryType, SystemDatabaseReferenceProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase } from '../models/projectEntry';
|
||||
import { EntryType, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||
import { SystemDatabaseReferenceProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase } from '../models/projectEntry';
|
||||
|
||||
let projFilePath: string;
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ import { AddDatabaseReferenceDialog } from '../dialogs/addDatabaseReferenceDialo
|
||||
import { IDacpacReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||
import { CreateProjectFromDatabaseDialog } from '../dialogs/createProjectFromDatabaseDialog';
|
||||
import { ImportDataModel } from '../models/api/import';
|
||||
import { ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||
import { SystemDatabaseReferenceProjectEntry, SystemDatabase, EntryType, FileProjectEntry } from '../models/projectEntry';
|
||||
import { EntryType, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||
import { SystemDatabaseReferenceProjectEntry, SystemDatabase, FileProjectEntry } from '../models/projectEntry';
|
||||
|
||||
let testContext: TestContext;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Project } from '../models/project';
|
||||
import { FolderNode, FileNode, sortFileFolderNodes } from '../models/tree/fileFolderTreeItem';
|
||||
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
||||
import { DatabaseProjectItemType } from '../common/constants';
|
||||
import { EntryType } from '../models/projectEntry';
|
||||
import { EntryType } from 'sqldbproj';
|
||||
|
||||
describe('Project Tree tests', function (): void {
|
||||
it('Should correctly order tree nodes by type, then by name', function (): void {
|
||||
|
||||
Reference in New Issue
Block a user