Skip to content

Commit

Permalink
re-enable some suites (1143) (#1220)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Weatherford <[email protected]>
  • Loading branch information
StephenWeatherford and Stephen Weatherford authored Feb 28, 2021
1 parent 80dbadf commit 271f5a8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 0 additions & 3 deletions test/functional/snippets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@ const overrideIgnoreSchemaValidation: { [name: string]: boolean } = {
*/
"Public IP Prefix": true,

// TODO: Blocked by https://github.com/microsoft/vscode-azurearmtools/issues/1143
"Recovery Service Vault": true,

/* TODO:
+ 'Value must be one of the following values: "2015-05-01-preview", "2015-06-15", "2016-03-30", "2018-04-01", "2018-06-01", "2018-07-01", "2019-04-01", "2019-06-01", "2019-07-01", "2019-08-01", "2019-09-01"'
*/
Expand Down
7 changes: 5 additions & 2 deletions test/functional/validation.acceptance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { ITestDiagnosticsOptions, minimalDeploymentTemplate, testDiagnostics, testDiagnosticsFromFile } from "../support/diagnostics";
import { testWithLanguageServer } from "../support/testWithLanguageServer";
import { testMessages } from "../testConstants";

suite("Acceptance validation tests (all sources)", () => {

Expand All @@ -27,7 +28,6 @@ suite("Acceptance validation tests (all sources)", () => {
[]);
});

/* TODO: blocked by https://github.com/microsoft/vscode-azurearmtools/issues/1143
createAcceptanceTest(
'templates/new-vm.jsonc',
{
Expand All @@ -38,12 +38,15 @@ suite("Acceptance validation tests (all sources)", () => {
`Warning: The parameter 'backupVaultRGIsNew' is never used. (arm-template (expressions)) [33,9-33,29]`,
`Warning: The parameter 'backupContainerName' is never used. (arm-template (expressions)) [48,9-48,30]`,
'Warning: Please use https for the schema URL (arm-template (schema)) [3,16-3,96]',
testMessages.linkedTemplateNoValidation("Acronis.acronis-backup-lin-20180305162104", "[197,21-197,64]"),
testMessages.nestedTemplateNoValidation("[concat('BackupVaultPolicy', '-', parameters('backupVaultName'), '-', parameters('backupPolicyName'))]", "[271,21-271,125]"),
testMessages.nestedTemplateNoValidation("[concat(parameters('virtualMachineName'), '-' , 'BackupIntent')]", "[312,21-312,87]"),

// Unrelated errors:
`Warning: For full schema validation, consider updating the value to one of the following: \"2016-05-15\". It is possible that the current resource version is valid but that a schema has not been generated. For more information see https://aka.ms/arm-tools-apiversion. (arm-template (schema)) [241,13-241,25]`,
`Warning: For full schema validation, consider updating the value to one of the following: \"2016-12-01\". It is possible that the current resource version is valid but that a schema has not been generated. For more information see https://aka.ms/arm-tools-apiversion. (arm-template (schema)) [294,29-294,41]`,

]);
*/

createAcceptanceTest(
'templates/language-service-p0.template.json',
Expand Down
12 changes: 8 additions & 4 deletions test/testConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/

// tslint:disable: prefer-template

import * as os from 'os';
import * as path from 'path';

Expand All @@ -27,11 +29,13 @@ console.log(`DISABLE_LANGUAGE_SERVER = ${DISABLE_LANGUAGE_SERVER}`);
export const logsFolder = path.join(basePath, 'logs');

export namespace testMessages {
export function nestedTemplateNoValidation(templateName: string): string {
return `Information: Nested template "${templateName}" will not have validation or parameter completion. To enable, either add default values to all top-level parameters or add a parameter file ("Select/Create Parameter File" command).`;
export function nestedTemplateNoValidation(templateName: string, range?: string): string {
return `Information: Nested template "${templateName}" will not have validation or parameter completion. To enable, either add default values to all top-level parameters or add a parameter file ("Select/Create Parameter File" command).`
+ (range ? ` (arm-template (expressions)) ${range}` : "");
}

export function linkedTemplateNoValidation(templateName: string): string {
return `Information: Linked template "${templateName}" will not have validation or parameter completion. To enable, either add default values to all top-level parameters or add a parameter file ("Select/Create Parameter File" command).`;
export function linkedTemplateNoValidation(templateName: string, range?: string): string {
return `Information: Linked template "${templateName}" will not have validation or parameter completion. To enable, either add default values to all top-level parameters or add a parameter file ("Select/Create Parameter File" command).`
+ (range ? ` (arm-template (expressions)) ${range}` : "");
}
}

0 comments on commit 271f5a8

Please sign in to comment.