Skip to content

Commit 7a0ee9c

Browse files
authored
Merge pull request #16 from Azure/master
bringing Asr one sdk azure- master in sync with master branch for azure/azure-powershell
2 parents 4ade22f + fa42dd3 commit 7a0ee9c

File tree

101 files changed

+44016
-194094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+44016
-194094
lines changed

NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<clear/>
55
<!-- Do not add any additional feeds if new packages are needed they need to come from nuget.org or our azure-sdk-for-net DevOps feed -->
66
<add key="local-feed" value="tools/LocalFeed" />
7-
<add key="myget-azure-powershell" value="https://www.myget.org/F/azure-powershell/api/v3/index.json" />
7+
<add key="azure-powershell" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-powershell/nuget/v3/index.json" />
88
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
99
</packageSources>
1010
<disabledPackageSources>

src/Automation/Automation.Test/ScenarioTests/VariableTests.ps1

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,15 @@ function Test-ArrayVariable
177177
-value $variableValue `
178178
-Encrypted:$false `
179179
-Description "array"
180-
Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString()
181-
182-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
183-
-AutomationAccountName $automationAccountName `
184-
-name $variableName
180+
Assert-AreEqual ($variableValue | ConvertTo-Json -Compress -Depth 2) ($variableCreated.value | ConvertTo-Json -Compress -Depth 2)
185181

186-
Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
182+
$updateVariable = Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
187183
-AutomationAccountName $automationAccountName `
188184
-Name $variableName `
189185
-Encrypted:$false `
190186
-value $variableValueUpdated
191-
192-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
193-
-AutomationAccountName $automationAccountName `
194-
-name $variableName
195187

196-
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString()
188+
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json -Compress -Depth 2) ($updateVariable.value | ConvertTo-Json -Compress -Depth 2)
197189

198190
Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName `
199191
-AutomationAccountName $automationAccountName `
@@ -225,23 +217,15 @@ function Test-NormalHashTableVariable
225217
-value $variableValue `
226218
-Encrypted:$false `
227219
-Description "NormalHashTableVariable"
228-
Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString()
229-
230-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
231-
-AutomationAccountName $automationAccountName `
232-
-name $variableName
220+
Assert-AreEqual ($variableValue | ConvertTo-Json -Compress -Depth 2) ($variableCreated.value | ConvertTo-Json -Compress -Depth 2)
233221

234-
Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
222+
$updateVariable = Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
235223
-AutomationAccountName $automationAccountName `
236224
-Name $variableName `
237225
-Encrypted:$false `
238226
-value $variableValueUpdated
239-
240-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
241-
-AutomationAccountName $automationAccountName `
242-
-name $variableName
243227

244-
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString()
228+
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json -Compress -Depth 2) ($updateVariable.value | ConvertTo-Json -Compress -Depth 2)
245229

246230
Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName `
247231
-AutomationAccountName $automationAccountName `
@@ -273,23 +257,15 @@ function Test-MultiLevelDictVariable
273257
-value $variableValue `
274258
-Encrypted:$false `
275259
-Description "MultiLevelDict"
276-
Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString()
277-
278-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
279-
-AutomationAccountName $automationAccountName `
280-
-name $variableName
260+
Assert-AreEqual ($variableValue | ConvertTo-Json -Compress -Depth 2) ($variableCreated.value | ConvertTo-Json -Compress -Depth 2)
281261

282-
Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
262+
$updateVariable = Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
283263
-AutomationAccountName $automationAccountName `
284264
-Name $variableName `
285265
-Encrypted:$false `
286266
-value $variableValueUpdated
287-
288-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
289-
-AutomationAccountName $automationAccountName `
290-
-name $variableName
291267

292-
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString()
268+
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json -Compress -Depth 2) ($updateVariable.value | ConvertTo-Json -Compress -Depth 2)
293269

294270
Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName `
295271
-AutomationAccountName $automationAccountName `
@@ -321,23 +297,15 @@ function Test-JsonInDictValueVariable
321297
-value $variableValue `
322298
-Encrypted:$false `
323299
-Description "JsonInDictValue"
324-
Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString()
325-
326-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
327-
-AutomationAccountName $automationAccountName `
328-
-name $variableName
300+
Assert-AreEqual ($variableValue | ConvertTo-Json -Compress -Depth 2) ($variableCreated.value | ConvertTo-Json -Compress -Depth 2)
329301

330-
Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
302+
$updateVariable = Set-AzAutomationVariable -ResourceGroupName $resourceGroupName `
331303
-AutomationAccountName $automationAccountName `
332304
-Name $variableName `
333305
-Encrypted:$false `
334306
-value $variableValueUpdated
335-
336-
$getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName `
337-
-AutomationAccountName $automationAccountName `
338-
-name $variableName
339307

340-
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString()
308+
Assert-AreEqual ($variableValueUpdated | ConvertTo-Json -Compress -Depth 2) ($updateVariable.value | ConvertTo-Json -Compress -Depth 2)
341309

342310
Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName `
343311
-AutomationAccountName $automationAccountName `

0 commit comments

Comments
 (0)