Skip to content

Commit 6753a82

Browse files
committed
sceanriotest1
1 parent 999d8ce commit 6753a82

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ $Location = "SouthEast Asia"
88
$PolicyName = "Policy9";
99
$PolicyId = "c87bbada-6e1b-4db2-b76c-9062d28959a4";
1010
$POName = "iaasvmcontainer;dev01testing;dev01testing"
11+
$ItemName = "iaasvmcontainer;dev01testing;dev01testing"
12+
$RecoveryPointName = "12520735098347"
1113

1214

13-
function Test-GetAzureRecoveryPoint
15+
function Test-GetAzureRecoveryPoints
1416
{
1517
$azureBackUpItem = New-Object Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupItem
1618
$azureBackUpItem.ResourceGroupName = $ResourceGroupName
1719
$azureBackUpItem.ResourceName = $ResourceGroupName
1820
$azureBackUpItem.Location = $Location
1921
$azureBackUpItem.ContainerUniqueName = $ContainerName
20-
$azureBackUpItem.ContainerType = $ContainerType
21-
$azureBackUpItem.DataSourceId = $DataSourceId
22-
$azureBackUpItem.Type = $DataSourceType
22+
$azureBackUpItem.ItemName = $ItemName
2323
$recoveryPoints = Get-AzureBackupRecoveryPoint -Item $azureBackUpItem
2424
if (!($recoveryPoints -eq $null))
2525
{
@@ -30,4 +30,21 @@ function Test-GetAzureRecoveryPoint
3030
Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null'
3131
}
3232
}
33+
}
34+
35+
function Test-GetAzureRecoveryPoint
36+
{
37+
$azureBackUpItem = New-Object Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupItem
38+
$azureBackUpItem.ResourceGroupName = $ResourceGroupName
39+
$azureBackUpItem.ResourceName = $ResourceGroupName
40+
$azureBackUpItem.Location = $Location
41+
$azureBackUpItem.ContainerUniqueName = $ContainerName
42+
$azureBackUpItem.ItemName = $ItemName
43+
$recoveryPoint = Get-AzureBackupRecoveryPoint -Item $azureBackUpItem -Id $RecoveryPointName
44+
if (!($recoveryPoint -eq $null))
45+
{
46+
Assert-NotNull $recoveryPoint.RecoveryPointTime 'RecoveryPointTime should not be null'
47+
Assert-NotNull $recoveryPoint.RecoveryPointType 'RecoveryPointType should not be null'
48+
Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null'
49+
}
3350
}

0 commit comments

Comments
 (0)