Skip to content

Commit 0e0ed86

Browse files
author
Pallavi Sah
committed
Fixing comments
1 parent 4b6b6ce commit 0e0ed86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arm-ttk/testcases/deploymentTemplate/adminPassword-Should-Not-Be-A-Literal.test.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<#
22
.Synopsis
3-
Ensures that all adminUsernames are expressions
3+
Ensures that all adminPasswords are expressions
44
.Description
5-
Ensures that all properties within a template named adminUsername are expressions, not literal strings
5+
Ensures that all properties within a template named adminPassword are expressions, not literal strings
66
#>
77
param(
88
[Parameter(Mandatory = $true)]
99
[PSObject]
1010
$TemplateObject
1111
)
1212

13-
# Find all references to an adminUserName
13+
# Find all references to an adminPassword
1414
# Filtering the complete $TemplateObject directly fails with "The script failed due to call depth overflow." errors
1515

1616
if ("resources" -in $TemplateObject.PSobject.Properties.Name) {
@@ -90,7 +90,7 @@ if ("variables" -in $TemplateObject.PSobject.Properties.Name) {
9090
$LoginPasswordHasFunction = $trimmedAdminLoginPassword | ?<ARM_Template_Function> -Extract
9191

9292
# If we had a variable reference (not inside of another function) - then check it
93-
# TODO this will not flag things like concat so we should add a blacklist here to ensure it's still not a static or deterministic username
93+
# TODO this will not flag things like concat so we should add a blacklist here to ensure it's still not a static or deterministic password
9494
if ($LoginPasswordHasVariable -and $LoginPasswordHasFunction.FunctionName -eq 'variables') {
9595
$variableValue = $TemplateObject.variables.($LoginPasswordHasVariable.VariableName)
9696
$variableValueExpression = $variableValue | ?<ARM_Template_Expression>
@@ -124,7 +124,7 @@ AdminLoginPassword references variable '$($LoginPasswordHasVariable.variableName
124124
$LoginPasswordHasFunction = $trimmedAdminPassword | ?<ARM_Template_Function> -Extract
125125

126126
# If we had a variable reference (not inside of another function) - then check it
127-
# TODO this will not flag things like concat so we should add a blacklist here to ensure it's still not a static or deterministic username
127+
# TODO this will not flag things like concat so we should add a blacklist here to ensure it's still not a static or deterministic password
128128
if ($LoginPasswordHasVariable -and $LoginPasswordHasFunction.FunctionName -eq 'variables') {
129129
$variableValue = $TemplateObject.variables.($LoginPasswordHasVariable.VariableName)
130130
$variableValueExpression = $variableValue | ?<ARM_Template_Expression>

0 commit comments

Comments
 (0)