File tree Expand file tree Collapse file tree 4 files changed +15
-16
lines changed
src/ResourceManager/AzureBatch/Commands.Batch.Test Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -630,8 +630,7 @@ public static RequestInterceptor CreateFakeGetFileAndPropertiesFromComputeNodeRe
630
630
631
631
foreach ( string id in jobIds )
632
632
{
633
- ProxyModels . CloudJob job = new ProxyModels . CloudJob ( ) ;
634
- job . Id = id ;
633
+ ProxyModels . CloudJob job = new ProxyModels . CloudJob ( id : id ) ;
635
634
jobs . Add ( job ) ;
636
635
}
637
636
Original file line number Diff line number Diff line change @@ -96,15 +96,15 @@ Tests getting a list of Batch node agent skus
96
96
#>
97
97
function Test-GetBatchNodeAgentSkus
98
98
{
99
- $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext
99
+ $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext
100
100
101
- # Get the node agent skus
102
- $nodeAgentSkus = Get-AzureBatchNodeAgentSku - BatchContext $context
101
+ # Get the node agent skus
102
+ $nodeAgentSkus = Get-AzureBatchNodeAgentSku - BatchContext $context
103
103
104
- foreach ($nodeAgentSku in $nodeAgentSkus )
104
+ foreach ($nodeAgentSku in $nodeAgentSkus )
105
105
{
106
106
Assert-True { $nodeAgentSku.Id.StartsWith (" batch.node" ) }
107
- Assert-True { $nodeAgentSku.OSType -in " linux" , " windows" }
108
- Assert-AreNotEqual 0 $nodeAgentSku.VerifiedImageReferences.Count
107
+ Assert-True { $nodeAgentSku.OSType -in " linux" , " windows" }
108
+ Assert-AreNotEqual 0 $nodeAgentSku.VerifiedImageReferences.Count
109
109
}
110
110
}
Original file line number Diff line number Diff line change @@ -99,12 +99,12 @@ Tests getting remote login settings from compute node
99
99
#>
100
100
function Test-GetRemoteLoginSettings
101
101
{
102
- param ([string ]$poolId , [string ]$computeNodeId )
103
-
104
- $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext
105
- $remoteLoginSettings = Get-AzureBatchComputeNode $poolId $computeNodeId - BatchContext $context | Get-AzureBatchRemoteLoginSettings - BatchContext $context
102
+ param ([string ]$poolId , [string ]$computeNodeId )
103
+
104
+ $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext
105
+ $remoteLoginSettings = Get-AzureBatchComputeNode $poolId $computeNodeId - BatchContext $context | Get-AzureBatchRemoteLoginSettings - BatchContext $context
106
106
107
- Assert-AreNotEqual $null $remoteLoginSettings.IPAddress
108
- Assert-AreNotEqual $null $remoteLoginSettings.Port
107
+ Assert-AreNotEqual $null $remoteLoginSettings.IPAddress
108
+ Assert-AreNotEqual $null $remoteLoginSettings.Port
109
109
}
110
110
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function Test-PoolCRUD
30
30
$targetOSVersion = " *"
31
31
$targetDedicated = 0
32
32
$vmSize = " small"
33
- $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration - ArgumentList @ ($osFamily , $targetOSVersion )
33
+ $paasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration - ArgumentList @ ($osFamily , $targetOSVersion )
34
34
New-AzureBatchPool $poolId1 - CloudServiceConfiguration $paasConfiguration - TargetDedicated $targetDedicated - VirtualMachineSize $vmSize - BatchContext $context
35
35
36
36
$vmSize = " standard_a1"
@@ -39,7 +39,7 @@ function Test-PoolCRUD
39
39
$osSKU = " 16.04.0-LTS"
40
40
$nodeAgent = " batch.node.ubuntu 16.04"
41
41
$imageRef = New-Object Microsoft.Azure.Commands.Batch.Models.PSImageReference - ArgumentList @ ($offer , $publisher , $osSKU )
42
- $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration - ArgumentList @ ($imageRef , $nodeAgent )
42
+ $iaasConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration - ArgumentList @ ($imageRef , $nodeAgent )
43
43
New-AzureBatchPool $poolId2 - VirtualMachineConfiguration $iaasConfiguration - TargetDedicated $targetDedicated - VirtualMachineSize $vmSize - BatchContext $context
44
44
45
45
# List the pools to ensure they were created
You can’t perform that action at this time.
0 commit comments