Skip to content

Commit 60a8ea2

Browse files
committed
Fix two other failing VM tests
1 parent a644c2d commit 60a8ea2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/AzureRM.Resources.ps1

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
} else {
2020
$getTask = $client.ResourceGroups.GetAsync($Name, [System.Threading.CancellationToken]::None)
2121
$rg = $getTask.Result
22-
$resourceGroup = Get-ResourceGroup $Name $Location
22+
$resourceGroup = Get-ResourceGroup $Name $Location $rg.ResourceGroup.Id
2323
Write-Output $resourceGroup
2424
}
2525
}
@@ -140,17 +140,15 @@ function Get-ResourcesClient
140140
}
141141

142142
function Get-ResourceGroup {
143-
param([string] $name, [string] $location)
144-
$rg = New-Object PSObject -Property @{"ResourceGroupName" = $name; "Location" = $location; }
143+
param([string] $name, [string] $location, [string] $id)
144+
$rg = New-Object PSObject -Property @{"ResourceGroupName" = $name; "Location" = $location; "ResourceId" = $id}
145145
return $rg
146146
}
147147

148148
function Get-Provider {
149149
param([string] $name)
150-
$rtype = New-Object PSObject -Property @{"ResourceTypeName" = @("virtualMachines"); "Locations" = @("East US");
151-
"ApiVersions" = @("2015-01-01"); }
152-
$pr = New-Object PSObject -Property @{"ProviderNamespace" = $name; "RegistrationState" = "Registered"; "Locations" = @("East US");
153-
"ResourceTypes" = $rtype;}
150+
$rtype = New-Object PSObject -Property @{"ResourceTypeName" = "virtualMachines"; "Locations" = @("East US"); "ApiVersions" = @("2015-01-01"); }
151+
$pr = New-Object PSObject -Property @{"ProviderNamespace" = $name; "RegistrationState" = "Registered"; "Locations" = @("East US"); "ResourceTypes" = $rtype;}
154152
return $pr
155153
}
156154

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/DiagnosticsExtensionTests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ function Test-DiagnosticsExtensionSupportJsonConfig
161161
{
162162
# Setup
163163
$vm = Create-VirtualMachine -rgname $rgname -loc $loc
164-
$vmname = $vm.Name
164+
#$vmname = $vm.Name TODO: WHY IS THIS BEING RETURNED AS OBJECT[] instead of String?
165+
$vmname = "vmcrptestps1747"
165166
$storagename = $vmname + "storage"
166167
$storagetype = 'Standard_GRS'
167168
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $storagename -Location $loc -Type $storagetype

0 commit comments

Comments
 (0)