enable Azure SQL DB Edge deployment in ADS (#10927)

* local deployment

* eula update

* remote deployment

* fix wording

* new extension

* script

* spacing

* fix test

* loc strings
This commit is contained in:
Alan Ren
2020-06-16 20:00:46 -07:00
committed by GitHub
parent 21fd8b22e7
commit c390d62675
12 changed files with 1115 additions and 14 deletions
+1 -1
View File
@@ -291,7 +291,7 @@
"template": "%bdc-agreement%",
"links": [
{
"text": "%bdc-agreement-privacy-statement%",
"text": "%microsoft-privacy-statement%",
"url": "https://go.microsoft.com/fwlink/?LinkId=853010"
},
{
@@ -45,7 +45,7 @@
"resource-type-sql-windows-setup-display-name": "SQL Server on Windows",
"resource-type-sql-windows-setup-description": "Run SQL Server on Windows, select a version to get started.",
"bdc-agreement": "I accept {0}, {1} and {2}.",
"bdc-agreement-privacy-statement": "Microsoft Privacy Statement",
"microsoft-privacy-statement": "Microsoft Privacy Statement",
"bdc-agreement-azdata-eula": "azdata License Terms",
"bdc-agreement-bdc-eula": "SQL Server License Terms",
"deployment.configuration.title": "Deployment configuration",
@@ -19,23 +19,29 @@ suite('Resource Type Service Tests', function (): void {
const toolsService = new ToolsService(mockPlatformService.object);
const notebookService = new NotebookService(mockPlatformService.object, '');
const resourceTypeService = new ResourceTypeService(mockPlatformService.object, toolsService, notebookService);
// index 0: platform name, index 1: number of expected resource types
const platforms: { platform: string; resourceTypeCount: number }[] = [
{ platform: 'win32', resourceTypeCount: 3 },
{ platform: 'darwin', resourceTypeCount: 2 },
{ platform: 'linux', resourceTypeCount: 2 }];
const totalResourceTypeCount = 3;
// index 0: platform name, index 1: expected resource types
const platforms: { platform: string; resourceTypes: string[] }[] = [
{
platform: 'win32', resourceTypes: ['sql-image', 'sql-bdc', 'sql-windows-setup']
},
{
platform: 'darwin', resourceTypes: ['sql-image', 'sql-bdc']
},
{
platform: 'linux', resourceTypes: ['sql-image', 'sql-bdc']
}
];
platforms.forEach(platformInfo => {
mockPlatformService.reset();
mockPlatformService.setup(service => service.platform()).returns(() => platformInfo.platform);
mockPlatformService.setup(service => service.showErrorMessage(TypeMoq.It.isAnyString()));
const resourceTypes = resourceTypeService.getResourceTypes(true);
assert.equal(resourceTypes.length, platformInfo.resourceTypeCount, `number of resource types for platform:${platformInfo.resourceTypeCount} does not meet expected value:${resourceTypes.length}.`);
const resourceTypes = resourceTypeService.getResourceTypes(true).map(rt => rt.name);
for (let i = 0; i < platformInfo.resourceTypes.length; i++) {
assert(resourceTypes.indexOf(platformInfo.resourceTypes[i]) !== -1, `resource type '${platformInfo.resourceTypes[i]}' should be available for platform: ${platformInfo.platform}.`);
}
});
const allResourceTypes = resourceTypeService.getResourceTypes(false);
assert.equal(allResourceTypes.length, totalResourceTypeCount, `number of resource types:${allResourceTypes.length} does not meet expected value:${totalResourceTypeCount}.`);
const validationErrors = resourceTypeService.validateResourceTypes(allResourceTypes);
assert(validationErrors.length === 0, `Validation errors detected in the package.json: ${validationErrors.join(EOL)}.`);
});