Skip to content

Commit 3bd2b72

Browse files
committed
Fix VM tests in order to continue the test scripts on non-terminating error messages.
1 parent 5aa8607 commit 3bd2b72

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ Tests Create-AzureVM with valid information.
1818
#>
1919
function Test-GetAzureVM
2020
{
21-
# Setup
21+
# Virtual Machine cmdlets are now showing a non-terminating error message for ResourceNotFound
22+
# To continue script, $ErrorActionPreference should be set to 'SilentlyContinue'.
23+
$ErrorActionPreference='SilentlyContinue';
2224

25+
# Setup
2326
$location = Get-DefaultLocation
2427
$imgName = Get-DefaultImage $location
2528

@@ -74,6 +77,10 @@ function Run-ServiceManagementCloudExceptionTests
7477
# Test Start/Stop-AzureVM for Multiple VMs
7578
function Run-StartAndStopMultipleVirtualMachinesTest
7679
{
80+
# Virtual Machine cmdlets are now showing a non-terminating error message for ResourceNotFound
81+
# To continue script, $ErrorActionPreference should be set to 'SilentlyContinue'.
82+
$ErrorActionPreference='SilentlyContinue';
83+
7784
# Setup
7885
$location = Get-DefaultLocation;
7986
$imgName = Get-DefaultImage $location;

0 commit comments

Comments
 (0)