Skip to content

Commit 795469a

Browse files
committed
updating test recordings
1 parent 4c548ad commit 795469a

File tree

22 files changed

+4236
-3809
lines changed

22 files changed

+4236
-3809
lines changed

src/Batch/Batch.Test/ScenarioTests/BatchAccountTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function Test-BatchAccountEndToEnd
8484
{
8585
# Delete the account
8686
Remove-AzBatchAccount -Name $accountName -ResourceGroupName $resourceGroup -Force
87-
$errorMessage = "The specified account does not exist."
87+
$errorMessage = "was not found"
8888
Assert-ThrowsContains { Get-AzBatchAccount -Name $accountName -ResourceGroupName $resourceGroup } $errorMessage
8989
}
9090
finally

src/Batch/Batch.Test/ScenarioTests/ComputeNodeTests.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Batch;
16+
using Microsoft.Azure.Batch.Common;
17+
using Microsoft.Azure.Commands.Batch.Models;
1618
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1719
using System;
1820
using Xunit;
@@ -114,7 +116,21 @@ public void TestGetComputeNodeRemoteLoginSettings()
114116
mockContext =>
115117
{
116118
context = new ScenarioTestContext();
117-
ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0);
119+
PSPoolEndpointConfiguration pSPoolEndpointConfiguration = new PSPoolEndpointConfiguration(new InboundNatPool[] {
120+
new InboundNatPool(
121+
name: "RDP",
122+
protocol: InboundEndpointProtocol.Tcp,
123+
backendPort: 3389,
124+
frontendPortRangeStart: 1,
125+
frontendPortRangeEnd: 1000,
126+
networkSecurityGroupRules: null)
127+
});
128+
129+
PSNetworkConfiguration pSNetworkConfiguration = new PSNetworkConfiguration()
130+
{
131+
EndpointConfiguration = pSPoolEndpointConfiguration
132+
};
133+
ScenarioTestHelpers.CreateTestPoolVirtualMachine(this, context, poolId, targetDedicated: 2, targetLowPriority: 0, networkConfiguration: pSNetworkConfiguration);
118134
ScenarioTestHelpers.WaitForSteadyPoolAllocation(this, context, poolId);
119135
},
120136
$"Test-GetRemoteLoginSettings '{poolId}'"

src/Batch/Batch.Test/ScenarioTests/ScenarioTestHelpers.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public static void CreateTestPoolVirtualMachine(
143143
int? targetDedicated,
144144
int? targetLowPriority,
145145
StartTask startTask = null,
146-
UpgradePolicy upgradePolicy = null)
146+
UpgradePolicy upgradePolicy = null,
147+
PSNetworkConfiguration networkConfiguration = null)
147148
{
148149
PSStartTask psStartTask = null;
149150
if (startTask != null)
@@ -156,6 +157,12 @@ public static void CreateTestPoolVirtualMachine(
156157
{
157158
psUpgradePolicy = new PSUpgradePolicy(upgradePolicy);
158159
}
160+
PSNetworkConfiguration pSNetworkConfiguration = null;
161+
if(networkConfiguration != null)
162+
{
163+
pSNetworkConfiguration = networkConfiguration;
164+
}
165+
159166

160167
string vmSize = "STANDARD_D2S_V3";
161168
string publisher = "canonical";
@@ -166,7 +173,7 @@ public static void CreateTestPoolVirtualMachine(
166173
PSImageReference imageReference = new PSImageReference(offer: offer, publisher: publisher, sku: sku);
167174
PSVirtualMachineConfiguration vmConfiguration = new PSVirtualMachineConfiguration(imageReference, nodeAgent);
168175
vmConfiguration.NodePlacementConfiguration = new PSNodePlacementConfiguration(NodePlacementPolicyType.Zonal);
169-
176+
170177
NewPoolParameters parameters = new NewPoolParameters(context, poolId)
171178
{
172179
VirtualMachineSize = vmSize,
@@ -176,7 +183,8 @@ public static void CreateTestPoolVirtualMachine(
176183
UpgradePolicy = psUpgradePolicy,
177184
StartTask = psStartTask,
178185
TaskSlotsPerNode = 1,
179-
InterComputeNodeCommunicationEnabled = true
186+
InterComputeNodeCommunicationEnabled = true,
187+
NetworkConfiguration = pSNetworkConfiguration
180188
};
181189

182190
CreatePoolIfNotExists(runner, parameters);

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountEndToEnd.json

Lines changed: 266 additions & 269 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestDisableAndEnableComputeNodeScheduling.json

Lines changed: 208 additions & 266 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestGetComputeNodeRemoteLoginSettings.json

Lines changed: 143 additions & 143 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootAndReimageComputeNode.json

Lines changed: 268 additions & 976 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRemoveComputeNodes.json

Lines changed: 153 additions & 208 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestComputeNodeUserEndToEnd.json

Lines changed: 227 additions & 276 deletions
Large diffs are not rendered by default.

src/Batch/Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestDisableEnableTerminateJobSchedule.json

Lines changed: 93 additions & 93 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)