mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Alanren/remove bdc (#8737)
* remove bdc server dependency * revert the change to script * cms needs 2 servers, adding 2019 server * fix pipeline yaml
This commit is contained in:
@@ -38,7 +38,7 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
||||||
KeyVaultName: SqlToolsSecretStore
|
KeyVaultName: SqlToolsSecretStore
|
||||||
SecretsFilter: 'ads-integration-test-azure-server,ads-integration-test-azure-server-password,ads-integration-test-azure-server-username,ads-integration-test-bdc-server,ads-integration-test-bdc-server-password,ads-integration-test-bdc-server-username,ads-integration-test-standalone-server,ads-integration-test-standalone-server-password,ads-integration-test-standalone-server-username'
|
SecretsFilter: 'ads-integration-test-azure-server,ads-integration-test-azure-server-password,ads-integration-test-azure-server-username,ads-integration-test-bdc-server,ads-integration-test-bdc-server-password,ads-integration-test-bdc-server-username,ads-integration-test-standalone-server,ads-integration-test-standalone-server-password,ads-integration-test-standalone-server-username,ads-integration-test-standalone-server-2019,ads-integration-test-standalone-server-password-2019,ads-integration-test-standalone-server-username-2019'
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
@@ -60,6 +60,9 @@ steps:
|
|||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
AZURE_SQL: $(ads-integration-test-azure-server)
|
||||||
|
STANDALONE_SQL_USERNAME_2019: $(ads-integration-test-standalone-server-username-2019)
|
||||||
|
STANDALONE_SQL_PWD_2019: $(ads-integration-test-standalone-server-password-2019)
|
||||||
|
STANDALONE_SQL_2019: $(ads-integration-test-standalone-server-2019)
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
@@ -83,6 +86,9 @@ steps:
|
|||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
AZURE_SQL: $(ads-integration-test-azure-server)
|
||||||
|
STANDALONE_SQL_USERNAME_2019: $(ads-integration-test-standalone-server-username-2019)
|
||||||
|
STANDALONE_SQL_PWD_2019: $(ads-integration-test-standalone-server-password-2019)
|
||||||
|
STANDALONE_SQL_2019: $(ads-integration-test-standalone-server-2019)
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
@@ -104,6 +110,9 @@ steps:
|
|||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
AZURE_SQL: $(ads-integration-test-azure-server)
|
||||||
|
STANDALONE_SQL_USERNAME_2019: $(ads-integration-test-standalone-server-username-2019)
|
||||||
|
STANDALONE_SQL_PWD_2019: $(ads-integration-test-standalone-server-password-2019)
|
||||||
|
STANDALONE_SQL_2019: $(ads-integration-test-standalone-server-2019)
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: 'Publish Integration and Smoke Test Results'
|
displayName: 'Publish Integration and Smoke Test Results'
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ const SECRET_BDC_SERVER_PASSWORD = 'ads-integration-test-bdc-server-password';
|
|||||||
const SECRET_STANDALONE_SERVER = 'ads-integration-test-standalone-server';
|
const SECRET_STANDALONE_SERVER = 'ads-integration-test-standalone-server';
|
||||||
const SECRET_STANDALONE_SERVER_USERNAME = 'ads-integration-test-standalone-server-username';
|
const SECRET_STANDALONE_SERVER_USERNAME = 'ads-integration-test-standalone-server-username';
|
||||||
const SECRET_STANDALONE_SERVER_PASSWORD = 'ads-integration-test-standalone-server-password';
|
const SECRET_STANDALONE_SERVER_PASSWORD = 'ads-integration-test-standalone-server-password';
|
||||||
|
const SECRET_STANDALONE_SERVER_2019 = 'ads-integration-test-standalone-server-2019';
|
||||||
|
const SECRET_STANDALONE_SERVER_USERNAME_2019 = 'ads-integration-test-standalone-server-username-2019';
|
||||||
|
const SECRET_STANDALONE_SERVER_PASSWORD_2019 = 'ads-integration-test-standalone-server-password-2019';
|
||||||
|
|
||||||
// Environment variable names
|
// Environment variable names
|
||||||
const ENVAR_AZURE_SERVER = 'AZURE_SQL';
|
const ENVAR_AZURE_SERVER = 'AZURE_SQL';
|
||||||
@@ -107,6 +110,9 @@ const ENVAR_BDC_SERVER_PASSWORD = 'BDC_BACKEND_PWD';
|
|||||||
const ENVAR_STANDALONE_SERVER = 'STANDALONE_SQL';
|
const ENVAR_STANDALONE_SERVER = 'STANDALONE_SQL';
|
||||||
const ENVAR_STANDALONE_SERVER_USERNAME = 'STANDALONE_SQL_USERNAME';
|
const ENVAR_STANDALONE_SERVER_USERNAME = 'STANDALONE_SQL_USERNAME';
|
||||||
const ENVAR_STANDALONE_SERVER_PASSWORD = 'STANDALONE_SQL_PWD';
|
const ENVAR_STANDALONE_SERVER_PASSWORD = 'STANDALONE_SQL_PWD';
|
||||||
|
const ENVAR_STANDALONE_SERVER_2019 = 'STANDALONE_SQL_2019';
|
||||||
|
const ENVAR_STANDALONE_SERVER_USERNAME_2019 = 'STANDALONE_SQL_USERNAME_2019';
|
||||||
|
const ENVAR_STANDALONE_SERVER_PASSWORD_2019 = 'STANDALONE_SQL_PWD_2019';
|
||||||
const ENVAR_PYTHON_INSTALL_PATH = 'PYTHON_TEST_PATH';
|
const ENVAR_PYTHON_INSTALL_PATH = 'PYTHON_TEST_PATH';
|
||||||
const ENVAR_RUN_PYTHON3_TEST = 'RUN_PYTHON3_TEST';
|
const ENVAR_RUN_PYTHON3_TEST = 'RUN_PYTHON3_TEST';
|
||||||
const ENVAR_RUN_PYSPARK_TEST = 'RUN_PYSPARK_TEST';
|
const ENVAR_RUN_PYSPARK_TEST = 'RUN_PYSPARK_TEST';
|
||||||
@@ -122,6 +128,9 @@ SecretEnVarMapping.push([SECRET_BDC_SERVER_USERNAME, ENVAR_BDC_SERVER_USERNAME])
|
|||||||
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER, ENVAR_STANDALONE_SERVER]);
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER, ENVAR_STANDALONE_SERVER]);
|
||||||
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_PASSWORD, ENVAR_STANDALONE_SERVER_PASSWORD]);
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_PASSWORD, ENVAR_STANDALONE_SERVER_PASSWORD]);
|
||||||
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_USERNAME, ENVAR_STANDALONE_SERVER_USERNAME]);
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_USERNAME, ENVAR_STANDALONE_SERVER_USERNAME]);
|
||||||
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_2019, ENVAR_STANDALONE_SERVER_2019]);
|
||||||
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_USERNAME_2019, ENVAR_STANDALONE_SERVER_USERNAME_2019]);
|
||||||
|
SecretEnVarMapping.push([SECRET_STANDALONE_SERVER_PASSWORD_2019, ENVAR_STANDALONE_SERVER_PASSWORD_2019]);
|
||||||
|
|
||||||
// Set the values that are not stored in AKV here
|
// Set the values that are not stored in AKV here
|
||||||
process.env[ENVAR_PYTHON_INSTALL_PATH] = NOTEBOOK_PYTHON_INSTALL_PATH;
|
process.env[ENVAR_PYTHON_INSTALL_PATH] = NOTEBOOK_PYTHON_INSTALL_PATH;
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ import * as utils from './utils';
|
|||||||
import * as uuid from './uuid';
|
import * as uuid from './uuid';
|
||||||
import { isTestSetupCompleted } from './testContext';
|
import { isTestSetupCompleted } from './testContext';
|
||||||
import assert = require('assert');
|
import assert = require('assert');
|
||||||
import { getStandaloneServer, TestServerProfile, getBdcServer } from './testConfig';
|
import { getStandaloneServer, TestServerProfile } from './testConfig';
|
||||||
|
|
||||||
let cmsService: mssql.ICmsService;
|
let cmsService: mssql.ICmsService;
|
||||||
let server: TestServerProfile;
|
let server: TestServerProfile;
|
||||||
let connectionId: string;
|
let connectionId: string;
|
||||||
let ownerUri: string;
|
let ownerUri: string;
|
||||||
const SERVER_CONNECTION_TIMEOUT: number = 3000;
|
const SERVER_CONNECTION_TIMEOUT: number = 3000;
|
||||||
const TEST_CMS_NAME = `adsTestCms_${uuid.v4()}`;
|
const TEST_CMS_NAME = `adsTestCms_${uuid.v4().asHex()}`;
|
||||||
const TEST_CMS_GROUP = `adsTestCmsGroup_${uuid.v4()}`;
|
const TEST_CMS_GROUP = `adsTestCmsGroup_${uuid.v4().asHex()}`;
|
||||||
const TEST_CMS_SERVER = `adsTestCmsServer_${uuid.v4()}`;
|
const TEST_CMS_SERVER = `adsTestCmsServer_${uuid.v4().asHex()}`;
|
||||||
const TEST_CMS_REG_SERVER = `adsTestCmsRegisteredServer_${uuid.v4()}`;
|
const TEST_CMS_REG_SERVER = `adsTestCmsRegisteredServer_${uuid.v4().asHex()}`;
|
||||||
|
|
||||||
if (isTestSetupCompleted()) {
|
if (isTestSetupCompleted()) {
|
||||||
suite('CMS integration test suite', () => {
|
suite('CMS integration test suite', () => {
|
||||||
@@ -101,26 +101,26 @@ if (isTestSetupCompleted()) {
|
|||||||
async () => cmsService.addRegisteredServer(ownerUri, '', undefined, 'test_description', undefined),
|
async () => cmsService.addRegisteredServer(ownerUri, '', undefined, 'test_description', undefined),
|
||||||
'Cannot add a registered without a name or connection');
|
'Cannot add a registered without a name or connection');
|
||||||
|
|
||||||
let bdcServer = await getBdcServer();
|
let server = await getStandaloneServer('2019');
|
||||||
let bdcConnection = {
|
let connection = {
|
||||||
serverName: bdcServer.serverName,
|
serverName: server.serverName,
|
||||||
userName: bdcServer.userName,
|
userName: server.userName,
|
||||||
password: bdcServer.password,
|
password: server.password,
|
||||||
authenticationType: bdcServer.authenticationTypeName,
|
authenticationType: server.authenticationTypeName,
|
||||||
database: bdcServer.database,
|
database: server.database,
|
||||||
provider: bdcServer.provider,
|
provider: server.provider,
|
||||||
version: bdcServer.version,
|
version: server.version,
|
||||||
engineType: bdcServer.engineType,
|
engineType: server.engineType,
|
||||||
options: {}
|
options: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Should create a registered server
|
// Should create a registered server
|
||||||
let result = await cmsService.addRegisteredServer(ownerUri, '', TEST_CMS_SERVER, 'test_description', bdcConnection);
|
let result = await cmsService.addRegisteredServer(ownerUri, '', TEST_CMS_SERVER, 'test_description', connection);
|
||||||
assert(result === true, `Registered server ${TEST_CMS_SERVER} was not added to CMS server successfully`);
|
assert(result === true, `Registered server ${TEST_CMS_SERVER} was not added to CMS server successfully`);
|
||||||
|
|
||||||
// Shouldn't be able to create a new registered server with same name
|
// Shouldn't be able to create a new registered server with same name
|
||||||
await utils.assertThrowsAsync(
|
await utils.assertThrowsAsync(
|
||||||
async () => await cmsService.addRegisteredServer(ownerUri, '', TEST_CMS_SERVER, 'test_description', bdcConnection),
|
async () => await cmsService.addRegisteredServer(ownerUri, '', TEST_CMS_SERVER, 'test_description', connection),
|
||||||
'Cannot add a registered server with existing name');
|
'Cannot add a registered server with existing name');
|
||||||
|
|
||||||
// Should remove the registered server we added above
|
// Should remove the registered server we added above
|
||||||
@@ -140,21 +140,21 @@ if (isTestSetupCompleted()) {
|
|||||||
`Registered Server Group ${TEST_CMS_GROUP} was not found after being added. Groups : [${cmsResources.registeredServerGroups.map(g => g.name).join(', ')}]`);
|
`Registered Server Group ${TEST_CMS_GROUP} was not found after being added. Groups : [${cmsResources.registeredServerGroups.map(g => g.name).join(', ')}]`);
|
||||||
|
|
||||||
// Should create a registered server under the group
|
// Should create a registered server under the group
|
||||||
let bdcServer = await getBdcServer();
|
let server = await getStandaloneServer('2019');
|
||||||
let bdcConnection = {
|
let connection = {
|
||||||
serverName: bdcServer.serverName,
|
serverName: server.serverName,
|
||||||
userName: bdcServer.userName,
|
userName: server.userName,
|
||||||
password: bdcServer.password,
|
password: server.password,
|
||||||
authenticationType: bdcServer.authenticationTypeName,
|
authenticationType: server.authenticationTypeName,
|
||||||
database: bdcServer.database,
|
database: server.database,
|
||||||
provider: bdcServer.provider,
|
provider: server.provider,
|
||||||
version: bdcServer.version,
|
version: server.version,
|
||||||
engineType: bdcServer.engineType,
|
engineType: server.engineType,
|
||||||
options: {}
|
options: {}
|
||||||
};
|
};
|
||||||
let relativePath = cmsResources.registeredServerGroups[0].relativePath;
|
let relativePath = cmsResources.registeredServerGroups[0].relativePath;
|
||||||
|
|
||||||
result = await cmsService.addRegisteredServer(ownerUri, relativePath, TEST_CMS_REG_SERVER, 'test_description', bdcConnection);
|
result = await cmsService.addRegisteredServer(ownerUri, relativePath, TEST_CMS_REG_SERVER, 'test_description', connection);
|
||||||
assert(result === true, `Registered server ${TEST_CMS_REG_SERVER} was not added to server group successfully`);
|
assert(result === true, `Registered server ${TEST_CMS_REG_SERVER} was not added to server group successfully`);
|
||||||
|
|
||||||
// Should remove the server group we added above
|
// Should remove the server group we added above
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import * as azdata from 'azdata';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { isTestSetupCompleted } from './testContext';
|
import { isTestSetupCompleted } from './testContext';
|
||||||
import { sqlNotebookContent, writeNotebookToFile, sqlKernelMetadata, getFileName, pySparkNotebookContent, pySparkKernelMetadata, pythonKernelMetadata, sqlNotebookMultipleCellsContent, notebookContentForCellLanguageTest, sqlKernelSpec, pythonKernelSpec, pySparkKernelSpec, CellTypes } from './notebook.util';
|
import { sqlNotebookContent, writeNotebookToFile, sqlKernelMetadata, getFileName, pySparkNotebookContent, pySparkKernelMetadata, pythonKernelMetadata, sqlNotebookMultipleCellsContent, notebookContentForCellLanguageTest, sqlKernelSpec, pythonKernelSpec, pySparkKernelSpec, CellTypes } from './notebook.util';
|
||||||
import { getBdcServer, getConfigValue, EnvironmentVariable_PYTHON_PATH, TestServerProfile } from './testConfig';
|
import { getConfigValue, EnvironmentVariable_PYTHON_PATH, TestServerProfile, getStandaloneServer } from './testConfig';
|
||||||
import { connectToServer, sleep, testServerProfileToIConnectionProfile } from './utils';
|
import { connectToServer, sleep, testServerProfileToIConnectionProfile } from './utils';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import { stressify } from 'adstest';
|
import { stressify } from 'adstest';
|
||||||
@@ -19,7 +19,7 @@ if (isTestSetupCompleted()) {
|
|||||||
suite('Notebook integration test suite', function () {
|
suite('Notebook integration test suite', function () {
|
||||||
setup(async function () {
|
setup(async function () {
|
||||||
console.log(`Start "${this.currentTest.title}"`);
|
console.log(`Start "${this.currentTest.title}"`);
|
||||||
let server = await getBdcServer();
|
let server = await getStandaloneServer();
|
||||||
assert(server && server.serverName, 'No server could be found');
|
assert(server && server.serverName, 'No server could be found');
|
||||||
await connectToServer(server, 6000);
|
await connectToServer(server, 6000);
|
||||||
});
|
});
|
||||||
@@ -394,7 +394,7 @@ class NotebookTester {
|
|||||||
notebookConfig.update('pythonPath', getConfigValue(EnvironmentVariable_PYTHON_PATH), 1);
|
notebookConfig.update('pythonPath', getConfigValue(EnvironmentVariable_PYTHON_PATH), 1);
|
||||||
let server: TestServerProfile;
|
let server: TestServerProfile;
|
||||||
if (!connectToDifferentServer) {
|
if (!connectToDifferentServer) {
|
||||||
server = await getBdcServer();
|
server = await getStandaloneServer();
|
||||||
assert(server && server.serverName, 'No server could be found in openNotebook');
|
assert(server && server.serverName, 'No server could be found in openNotebook');
|
||||||
await connectToServer(server, 6000);
|
await connectToServer(server, 6000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { stressify } from 'adstest';
|
|||||||
|
|
||||||
if (isTestSetupCompleted()) {
|
if (isTestSetupCompleted()) {
|
||||||
suite('Object Explorer integration suite', () => {
|
suite('Object Explorer integration suite', () => {
|
||||||
test('BDC instance node label test', async function () {
|
test.skip('BDC instance node label test', async function () {
|
||||||
return await (new ObjectExplorerTester()).bdcNodeLabelTest();
|
return await (new ObjectExplorerTester()).bdcNodeLabelTest();
|
||||||
});
|
});
|
||||||
test('Standalone instance node label test', async function () {
|
test('Standalone instance node label test', async function () {
|
||||||
@@ -22,7 +22,7 @@ if (isTestSetupCompleted()) {
|
|||||||
test('Azure SQL DB instance node label test @UNSTABLE@', async function () {
|
test('Azure SQL DB instance node label test @UNSTABLE@', async function () {
|
||||||
return await (new ObjectExplorerTester()).sqlDbNodeLabelTest();
|
return await (new ObjectExplorerTester()).sqlDbNodeLabelTest();
|
||||||
});
|
});
|
||||||
test('BDC instance context menu test', async function () {
|
test.skip('BDC instance context menu test', async function () {
|
||||||
return await (new ObjectExplorerTester()).bdcContextMenuTest();
|
return await (new ObjectExplorerTester()).bdcContextMenuTest();
|
||||||
});
|
});
|
||||||
test('Azure SQL DB context menu test @UNSTABLE@', async function () {
|
test('Azure SQL DB context menu test @UNSTABLE@', async function () {
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ export const EnvironmentVariable_AZURE_SERVER: string = 'AZURE_SQL';
|
|||||||
export const EnvironmentVariable_AZURE_USERNAME: string = 'AZURE_SQL_USERNAME';
|
export const EnvironmentVariable_AZURE_USERNAME: string = 'AZURE_SQL_USERNAME';
|
||||||
export const EnvironmentVariable_AZURE_PASSWORD: string = 'AZURE_SQL_PWD';
|
export const EnvironmentVariable_AZURE_PASSWORD: string = 'AZURE_SQL_PWD';
|
||||||
export const EnvironmentVariable_PYTHON_PATH: string = 'PYTHON_TEST_PATH';
|
export const EnvironmentVariable_PYTHON_PATH: string = 'PYTHON_TEST_PATH';
|
||||||
|
export const EnvironmentVariable_STANDALONE_SERVER_2019: string = 'STANDALONE_SQL_2019';
|
||||||
|
export const EnvironmentVariable_STANDALONE_USERNAME_2019: string = 'STANDALONE_SQL_USERNAME_2019';
|
||||||
|
export const EnvironmentVariable_STANDALONE_PASSWORD_2019: string = 'STANDALONE_SQL_PWD_2019';
|
||||||
|
|
||||||
export class TestServerProfile {
|
export class TestServerProfile {
|
||||||
constructor(private _profile: ITestServerProfile) { }
|
constructor(private _profile: ITestServerProfile) { }
|
||||||
@@ -113,6 +116,17 @@ let TestingServers: TestServerProfile[] = [
|
|||||||
provider: ConnectionProvider.SQLServer,
|
provider: ConnectionProvider.SQLServer,
|
||||||
version: '2019',
|
version: '2019',
|
||||||
engineType: EngineType.BigDataCluster
|
engineType: EngineType.BigDataCluster
|
||||||
|
}),
|
||||||
|
new TestServerProfile(
|
||||||
|
{
|
||||||
|
serverName: getConfigValue(EnvironmentVariable_STANDALONE_SERVER_2019),
|
||||||
|
userName: getConfigValue(EnvironmentVariable_STANDALONE_USERNAME_2019),
|
||||||
|
password: getConfigValue(EnvironmentVariable_STANDALONE_PASSWORD_2019),
|
||||||
|
authenticationType: AuthenticationType.SqlLogin,
|
||||||
|
database: 'master',
|
||||||
|
provider: ConnectionProvider.SQLServer,
|
||||||
|
version: '2019',
|
||||||
|
engineType: EngineType.Standalone
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -130,9 +144,9 @@ export async function getAzureServer(): Promise<TestServerProfile> {
|
|||||||
return servers.filter(s => s.engineType === EngineType.Azure)[0];
|
return servers.filter(s => s.engineType === EngineType.Azure)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStandaloneServer(): Promise<TestServerProfile> {
|
export async function getStandaloneServer(version: '2017' | '2019' = '2017'): Promise<TestServerProfile> {
|
||||||
let servers = await getTestingServers();
|
let servers = await getTestingServers();
|
||||||
return servers.filter(s => s.version === '2017' && s.engineType === EngineType.Standalone)[0];
|
return servers.filter(s => s.version === version && s.engineType === EngineType.Standalone)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getBdcServer(): Promise<TestServerProfile> {
|
export async function getBdcServer(): Promise<TestServerProfile> {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export async function createDB(dbName: string, ownerUri: string): Promise<void>
|
|||||||
SELECT ERROR_MESSAGE() AS ErrorMessage;
|
SELECT ERROR_MESSAGE() AS ErrorMessage;
|
||||||
END CATCH`;
|
END CATCH`;
|
||||||
|
|
||||||
let dbCreatedResult = await this.runQuery(query, ownerUri);
|
let dbCreatedResult = await runQuery(query, ownerUri);
|
||||||
assert(dbCreatedResult.columnInfo[0].columnName !== 'ErrorMessage', 'DB creation threw error');
|
assert(dbCreatedResult.columnInfo[0].columnName !== 'ErrorMessage', 'DB creation threw error');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ export async function deleteDB(server: TestServerProfile, dbName: string, ownerU
|
|||||||
END CATCH`;
|
END CATCH`;
|
||||||
|
|
||||||
ownerUri = await ensureServerConnected(server, ownerUri);
|
ownerUri = await ensureServerConnected(server, ownerUri);
|
||||||
let dbDeleteResult = await this.runQuery(query, ownerUri);
|
let dbDeleteResult = await runQuery(query, ownerUri);
|
||||||
assert(dbDeleteResult.columnInfo[0].columnName !== 'ErrorMessage', 'DB deletion threw error');
|
assert(dbDeleteResult.columnInfo[0].columnName !== 'ErrorMessage', 'DB deletion threw error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user