mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
sql proj - publish to docker improvements (#17124)
This commit is contained in:
@@ -88,6 +88,27 @@ describe('deploy service', function (): void {
|
||||
|
||||
});
|
||||
|
||||
it('Should deploy fails if docker is not running', async function (): Promise<void> {
|
||||
const testContext = createContext();
|
||||
const deployProfile: IDeployProfile = {
|
||||
localDbSetting: {
|
||||
dbName: 'test',
|
||||
password: 'PLACEHOLDER',
|
||||
port: 1433,
|
||||
serverName: 'localhost',
|
||||
userName: 'sa',
|
||||
dockerBaseImage: 'image',
|
||||
connectionRetryTimeout: 1
|
||||
}
|
||||
};
|
||||
const projFilePath = await testUtils.createTestSqlProjFile(baselines.newProjectFileBaseline);
|
||||
const project1 = await Project.openProject(vscode.Uri.file(projFilePath).fsPath);
|
||||
const deployService = new DeployService(testContext.outputChannel);
|
||||
sandbox.stub(azdata.tasks, 'startBackgroundOperation').callThrough();
|
||||
sandbox.stub(childProcess, 'exec').throws('error');
|
||||
await should(deployService.deploy(deployProfile, project1)).rejected();
|
||||
});
|
||||
|
||||
it('Should retry connecting to the server', async function (): Promise<void> {
|
||||
const testContext = createContext();
|
||||
const localDbSettings = {
|
||||
|
||||
Reference in New Issue
Block a user