Skip to content

Commit 390ffbe

Browse files
committed
Merge pull request #95 from Azure/dev
.
2 parents a688180 + b061063 commit 390ffbe

24 files changed

+503
-620
lines changed

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private void TestReimageComputeNode(bool usePipeline)
170170
}
171171

172172
// Cmdlets that use the HTTP Recorder interceptor for use with scenario tests
173-
[Cmdlet(VerbsCommon.Get, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)]
173+
[Cmdlet(VerbsCommon.Get, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)]
174174
public class GetBatchComputeNodeScenarioTestCommand : GetBatchComputeNodeCommand
175175
{
176176
protected override void ProcessRecord()
@@ -180,7 +180,7 @@ protected override void ProcessRecord()
180180
}
181181
}
182182

183-
[Cmdlet(VerbsLifecycle.Restart, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
183+
[Cmdlet(VerbsLifecycle.Restart, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
184184
public class RestartBatchComputeNodeScenarioTestCommand : RestartBatchComputeNodeCommand
185185
{
186186
protected override void ProcessRecord()
@@ -190,7 +190,7 @@ protected override void ProcessRecord()
190190
}
191191
}
192192

193-
[Cmdlet(VerbsCommon.Reset, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
193+
[Cmdlet(VerbsCommon.Reset, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
194194
public class ResetBatchComputeNodeScenarioTestCommand : ResetBatchComputeNodeCommand
195195
{
196196
protected override void ProcessRecord()

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ function Test-GetComputeNodeById
2121
param([string]$accountName, [string]$poolId)
2222

2323
$context = Get-AzureRMBatchAccountKeys -Name $accountName
24-
$computeNodeId = (Get-AzureRMBatchComputeNode_ST -PoolId $poolId -BatchContext $context)[0].Id
24+
$computeNodeId = (Get-AzureBatchComputeNode_ST -PoolId $poolId -BatchContext $context)[0].Id
2525

26-
$computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context
26+
$computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context
2727

2828
Assert-AreEqual $computeNodeId $computeNode.Id
2929

3030
# Verify positional parameters also work
31-
$computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context
31+
$computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context
3232

3333
Assert-AreEqual $computeNodeId $computeNode.Id
3434
}
@@ -44,7 +44,7 @@ function Test-ListComputeNodesByFilter
4444
$context = Get-AzureRMBatchAccountKeys -Name $accountName
4545
$filter = "state eq '" + "$state" + "'"
4646

47-
$computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter $filter -BatchContext $context
47+
$computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter $filter -BatchContext $context
4848

4949
Assert-AreEqual $matches $computeNodes.Length
5050
foreach($node in $computeNodes)
@@ -53,8 +53,8 @@ function Test-ListComputeNodesByFilter
5353
}
5454

5555
# Verify parent object parameter set also works
56-
$pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context
57-
$computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -Filter $filter -BatchContext $context
56+
$pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
57+
$computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -Filter $filter -BatchContext $context
5858

5959
Assert-AreEqual $matches $computeNodes.Length
6060
foreach($node in $computeNodes)
@@ -72,13 +72,13 @@ function Test-ListComputeNodesWithMaxCount
7272
param([string]$accountName, [string]$poolId, [string]$maxCount)
7373

7474
$context = Get-AzureRMBatchAccountKeys -Name $accountName
75-
$computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -MaxCount $maxCount -BatchContext $context
75+
$computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -MaxCount $maxCount -BatchContext $context
7676

7777
Assert-AreEqual $maxCount $computeNodes.Length
7878

7979
# Verify parent object parameter set also works
80-
$pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context
81-
$computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -MaxCount $maxCount -BatchContext $context
80+
$pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
81+
$computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -MaxCount $maxCount -BatchContext $context
8282

8383
Assert-AreEqual $maxCount $computeNodes.Length
8484
}
@@ -92,27 +92,27 @@ function Test-ListAllComputeNodes
9292
param([string]$accountName, [string]$poolId, [string]$count)
9393

9494
$context = Get-AzureRMBatchAccountKeys -Name $accountName
95-
$computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -BatchContext $context
95+
$computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -BatchContext $context
9696

9797
Assert-AreEqual $count $computeNodes.Length
9898

9999
# Verify parent object parameter set also works
100-
$pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context
101-
$computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -BatchContext $context
100+
$pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
101+
$computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -BatchContext $context
102102

103103
Assert-AreEqual $count $computeNodes.Length
104104
}
105105

106106
<#
107107
.SYNOPSIS
108-
Tests piping Get-AzureRMBatchPool into Get-AzureRMBatchComputeNode
108+
Tests piping Get-AzureBatchPool into Get-AzureBatchComputeNode
109109
#>
110110
function Test-ListComputeNodePipeline
111111
{
112112
param([string]$accountName, [string]$poolId, [string]$count)
113113

114114
$context = Get-AzureRMBatchAccountKeys -Name $accountName
115-
$computeNodes = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Get-AzureRMBatchComputeNode_ST -BatchContext $context
115+
$computeNodes = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Get-AzureBatchComputeNode_ST -BatchContext $context
116116

117117
Assert-AreEqual $count $computeNodes.Count
118118
}
@@ -131,14 +131,14 @@ function Test-RebootComputeNode
131131

132132
if ($usePipeline -eq '1')
133133
{
134-
Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Restart-AzureRMBatchComputeNode_ST -RebootOption $rebootOption -BatchContext $context
134+
Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Restart-AzureBatchComputeNode_ST -RebootOption $rebootOption -BatchContext $context
135135
}
136136
else
137137
{
138-
Restart-AzureRMBatchComputeNode_ST $poolId $computeNodeId -RebootOption $rebootOption -BatchContext $context
138+
Restart-AzureBatchComputeNode_ST $poolId $computeNodeId -RebootOption $rebootOption -BatchContext $context
139139
}
140140

141-
$computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
141+
$computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
142142

143143
Assert-AreEqual 'Rebooting' $computeNode.State
144144
}
@@ -157,14 +157,14 @@ function Test-ReimageComputeNode
157157

158158
if ($usePipeline -eq '1')
159159
{
160-
Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Reset-AzureRMBatchComputeNode_ST -ReimageOption $reimageOption -BatchContext $context
160+
Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Reset-AzureBatchComputeNode_ST -ReimageOption $reimageOption -BatchContext $context
161161
}
162162
else
163163
{
164-
Reset-AzureRMBatchComputeNode_ST $poolId $computeNodeId -ReimageOption $reimageOption -BatchContext $context
164+
Reset-AzureBatchComputeNode_ST $poolId $computeNodeId -ReimageOption $reimageOption -BatchContext $context
165165
}
166166

167-
$computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
167+
$computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
168168

169169
Assert-AreEqual 'Reimaging' $computeNode.State
170170
}

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void TestDeleteComputeNodeUser()
9595
}
9696

9797
// Cmdlets that use the HTTP Recorder interceptor for use with scenario tests
98-
[Cmdlet(VerbsCommon.New, "AzureRMBatchComputeNodeUser_ST")]
98+
[Cmdlet(VerbsCommon.New, "AzureBatchComputeNodeUser_ST")]
9999
public class NewBatchComputeNodeUserScenarioTestCommand : NewBatchComputeNodeUserCommand
100100
{
101101
protected override void ProcessRecord()
@@ -105,7 +105,7 @@ protected override void ProcessRecord()
105105
}
106106
}
107107

108-
[Cmdlet(VerbsCommon.Remove, "AzureRMBatchComputeNodeUser_ST")]
108+
[Cmdlet(VerbsCommon.Remove, "AzureBatchComputeNodeUser_ST")]
109109
public class RemoveBatchComputeNodeUserScenarioTestCommand : RemoveBatchComputeNodeUserCommand
110110
{
111111
protected override void ProcessRecord()

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ function Test-CreateComputeNodeUser
2727
if ($usePipeline -eq '1')
2828
{
2929
$expiryTime = New-Object DateTime -ArgumentList @(2020,01,01)
30-
$computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context
31-
$computeNode | New-AzureRMBatchComputeNodeUser_ST -Name $userName -Password $password -ExpiryTime $expiryTime -IsAdmin -BatchContext $context
30+
$computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context
31+
$computeNode | New-AzureBatchComputeNodeUser_ST -Name $userName -Password $password -ExpiryTime $expiryTime -IsAdmin -BatchContext $context
3232
}
3333
else
3434
{
35-
New-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Password $password -BatchContext $context
35+
New-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Password $password -BatchContext $context
3636
}
3737

3838
# Verify that a user was created
3939
# There is currently no Get/List user API, so verify by calling the delete operation.
4040
# If the user account was created, it will succeed; otherwsie, it will throw a 404 error.
41-
Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context
41+
Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context
4242
}
4343

4444
<#
@@ -51,9 +51,9 @@ function Test-DeleteComputeNodeUser
5151

5252
$context = Get-AzureRMBatchAccountKeys -Name $accountName
5353

54-
Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context
54+
Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context
5555

5656
# Verify the user was deleted
5757
# There is currently no Get/List user API, so try to delete the user again and verify that it fails.
58-
Assert-Throws { Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context }
58+
Assert-Throws { Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context }
5959
}

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public void TestGetRemoteDesktopProtocolFilePipeline()
446446
}
447447

448448
// Cmdlets that use the HTTP Recorder interceptor for use with scenario tests
449-
[Cmdlet(VerbsCommon.Get, "AzureRMBatchNodeFile_ST", DefaultParameterSetName = ComputeNodeAndIdParameterSet)]
449+
[Cmdlet(VerbsCommon.Get, "AzureBatchNodeFile_ST", DefaultParameterSetName = ComputeNodeAndIdParameterSet)]
450450
public class GetBatchNodeFileScenarioTestCommand : GetBatchNodeFileCommand
451451
{
452452
protected override void ProcessRecord()
@@ -456,7 +456,7 @@ protected override void ProcessRecord()
456456
}
457457
}
458458

459-
[Cmdlet(VerbsCommon.Get, "AzureRMBatchNodeFileContent_ST")]
459+
[Cmdlet(VerbsCommon.Get, "AzureBatchNodeFileContent_ST")]
460460
public class GetBatchNodeFileContentScenarioTestCommand : GetBatchNodeFileContentCommand
461461
{
462462
protected override void ProcessRecord()
@@ -466,7 +466,7 @@ protected override void ProcessRecord()
466466
}
467467
}
468468

469-
[Cmdlet(VerbsCommon.Get, "AzureRMBatchRemoteDesktopProtocolFile_ST")]
469+
[Cmdlet(VerbsCommon.Get, "AzureBatchRemoteDesktopProtocolFile_ST")]
470470
public class GetBatchRemoteDesktopProtocolFileScenarioTestCommand : GetBatchRemoteDesktopProtocolFileCommand
471471
{
472472
protected override void ProcessRecord()

0 commit comments

Comments
 (0)