Skip to content

Commit e9d5eae

Browse files
committed
Merge pull request #34 from MabOneSdk/panbha10
rpt
2 parents ba5cb9a + 3585f13 commit e9d5eae

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTests.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ function GetAzureRecoveryPointTest
5252
$azureBackUpItem.DataSourceId = $DataSourceId
5353
$azureBackUpItem.Type = $DataSourceType
5454
$recoveryPoints = Get-AzureBackupRecoveryPoint -item $azureBackUpItem
55-
Assert-NotNull $recoveryPoints 'Recovery Points should not be null'
56-
foreach($recoveryPoint in $recoveryPoints)
55+
if (!($recoveryPoints -eq $null))
5756
{
58-
Assert-NotNull $recoveryPoint.RecoveryPointTime 'RecoveryPointTime should not be null'
59-
Assert-NotNull $recoveryPoint.RecoveryPointType 'RecoveryPointType should not be null'
60-
Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null'
57+
foreach($recoveryPoint in $recoveryPoints)
58+
{
59+
Assert-NotNull $recoveryPoint.RecoveryPointTime 'RecoveryPointTime should not be null'
60+
Assert-NotNull $recoveryPoint.RecoveryPointType 'RecoveryPointType should not be null'
61+
Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null'
62+
}
6163
}
6264
}
6365

0 commit comments

Comments
 (0)