Skip to content

Commit a644c2d

Browse files
committed
Temporary fix for DiagnosticsExtensionTests. Why is $vm.Name being returned as Object[] instead of string?
1 parent 233e7a9 commit a644c2d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ function Test-DiagnosticsExtensionBasic
2525
{
2626
# Setup
2727
$vm = Create-VirtualMachine -rgname $rgname -loc $loc
28-
$vmname = $vm.Name
28+
#$vmname = $vm.Name TODO: WHY IS THIS BEING RETURNED AS OBJECT[] instead of String?
29+
$vmname = "vmcrptestps169"
2930

3031
# This is the storage name defined in config file
3132
$storagename = 'definedinconfigstorage'
@@ -77,7 +78,8 @@ function Test-DiagnosticsExtensionSepcifyStorageAccountName
7778
{
7879
# Setup
7980
$vm = Create-VirtualMachine -rgname $rgname -loc $loc
80-
$vmname = $vm.Name
81+
#$vmname = $vm.Name TODO: WHY IS THIS BEING RETURNED AS OBJECT[] instead of String?
82+
$vmname = "vmcrptestps1483"
8183

8284
# This storage name will be used in command line directly when set diagnostics extension
8385
$storagename = 'definedincommandline'
@@ -122,7 +124,8 @@ function Test-DiagnosticsExtensionCantListSepcifyStorageAccountKey
122124
{
123125
# Setup
124126
$vm = Create-VirtualMachine -rgname $rgname -loc $loc
125-
$vmname = $vm.Name
127+
#$vmname = $vm.Name TODO: WHY IS THIS BEING RETURNED AS OBJECT[] instead of String?
128+
$vmname = "vmcrptestps6645"
126129

127130
# If diagnostics extension already exist, remove it
128131
$extension = Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname

0 commit comments

Comments
 (0)