File tree Expand file tree Collapse file tree 5 files changed +3638
-404
lines changed
src/ResourceManager/AzureBatch
SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests Expand file tree Collapse file tree 5 files changed +3638
-404
lines changed Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Current Release
21
+ * Fixed a bug where account operations without a resource group failed to auto-detect the resource group.
21
22
22
23
## Version 4.0.1
23
24
* Fixed assembly loading issue that caused some cmdlets to fail when executing
Original file line number Diff line number Diff line change @@ -63,7 +63,12 @@ function Test-BatchAccountEndToEnd
63
63
Assert-AreEqual 1 $updatedAccount.Tags.Count
64
64
Assert-AreEqual $newTagValue $updatedAccount.Tags [$newTagName ]
65
65
66
- # Get the account keys
66
+ # Get the account keys (without resource group)
67
+ $accountWithKeys = Get-AzureRmBatchAccountKeys - Name $accountName
68
+ Assert-NotNull $accountWithKeys.PrimaryAccountKey
69
+ Assert-NotNull $accountWithKeys.SecondaryAccountKey
70
+
71
+ # Get the account keys (with resource group)
67
72
$accountWithKeys = Get-AzureRmBatchAccountKeys - Name $accountName - ResourceGroupName $resourceGroup
68
73
Assert-NotNull $accountWithKeys.PrimaryAccountKey
69
74
Assert-NotNull $accountWithKeys.SecondaryAccountKey
@@ -80,8 +85,8 @@ function Test-BatchAccountEndToEnd
80
85
{
81
86
# Delete the account
82
87
Remove-AzureRmBatchAccount - Name $accountName - ResourceGroupName $resourceGroup - Force
83
- $errorMessage = " The Resource 'Microsoft.Batch/batchAccounts/ $accountName ' under resource group ' $resourceGroup ' was not found ."
84
- Assert-Throws { Get-AzureRmBatchAccount - Name $accountName - ResourceGroupName $resourceGroup } $errorMessage
88
+ $errorMessage = " The specified account does not exist ."
89
+ Assert-ThrowsContains { Get-AzureRmBatchAccount - Name $accountName - ResourceGroupName $resourceGroup } $errorMessage
85
90
}
86
91
finally
87
92
{
Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ function Get-BatchAccountProviderLocation($index)
52
52
{
53
53
$namespace = " Microsoft.Batch"
54
54
$type = " batchAccounts"
55
- $r = Get-AzureRmResourceProvider - ProviderNamespace $namespace | where {$_.ResourceTypes [0 ].ResourceTypeName -eq $type }
55
+ $r = Get-AzureRmResourceProvider - ProviderNamespace $namespace | where {$_.ResourceTypes [0 ].ResourceTypeName -eq $type }
56
56
$location = $r.Locations
57
57
58
- if ($location -eq $null )
58
+ if ($location -eq $null )
59
59
{
60
- return " westus"
60
+ return " westus"
61
61
}
62
62
else
63
63
{
@@ -67,7 +67,7 @@ function Get-BatchAccountProviderLocation($index)
67
67
}
68
68
else
69
69
{
70
- return $location [$index ]
70
+ return $location [$index ]
71
71
}
72
72
}
73
73
}
You can’t perform that action at this time.
0 commit comments