Skip to content

Commit 72710d3

Browse files
committed
Update the CommandToExecute specified in TestVirtualMachineExtension and TestVirtualMachineExtensionUsingHashTable test cases to avoid "CommandToExecute is not specified" error.
1 parent 8666922 commit 72710d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function Test-VirtualMachineExtension
116116
$extver = '1.1';
117117

118118
# Set extension settings by raw strings
119-
$settingstr = '{"fileUris":[],"commandToExecute":""}';
119+
$settingstr = '{"fileUris":[],"commandToExecute":"powershell Get-Process"}';
120120
$protectedsettingstr = '{"storageAccountName":"' + $stoname + '","storageAccountKey":"' + $stokey + '"}';
121121
Set-AzureRmVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -ExtensionType $exttype -TypeHandlerVersion $extver -SettingString $settingstr -ProtectedSettingString $protectedsettingstr;
122122

@@ -256,7 +256,7 @@ function Test-VirtualMachineExtensionUsingHashTable
256256
$extver = '1.1';
257257

258258
# Set extension settings by hash table
259-
$settings = @{"fileUris" = @(); "commandToExecute" = ""};
259+
$settings = @{"fileUris" = @(); "commandToExecute" = "powershell Get-Process"};
260260
$protectedsettings = @{"storageAccountName" = $stoname; "storageAccountKey" = $stokey};
261261
Set-AzureRmVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -ExtensionType $exttype -TypeHandlerVersion $extver -Settings $settings -ProtectedSettings $protectedsettings;
262262

0 commit comments

Comments
 (0)