Skip to content

Commit 999d8ce

Browse files
committed
sceanriotest
1 parent 9828ff9 commit 999d8ce

File tree

4 files changed

+62
-3
lines changed

4 files changed

+62
-3
lines changed

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

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

1213

1314
function Test-BackUpAzureBackUpItem
@@ -17,8 +18,6 @@ function Test-BackUpAzureBackUpItem
1718
$azureBackUpItem.ResourceName = $ResourceName
1819
$azureBackUpItem.Location = $Location
1920
$azureBackUpItem.ContainerUniqueName = $ContainerName
20-
$azureBackUpItem.ContainerType = $ContainerType
21-
$azureBackUpItem.DataSourceId = $DataSourceId
22-
$azureBackUpItem.Type = $DataSourceType
21+
$azureBackUpItem.ItemName = $ItemName
2322
$jobId = Backup-AzureBackupItem -Item $azureBackUpItem
2423
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests
1919
{
2020
public class RecoveryPointTests : AzureBackupTestsBase
2121
{
22+
[Fact]
23+
public void GetRecoveryPointsTests()
24+
{
25+
this.RunPowerShellTest("Test-GetAzureRecoveryPoints");
26+
}
27+
2228
[Fact]
2329
public void GetRecoveryPointTests()
2430
{
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
16+
using Xunit;
17+
18+
namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests
19+
{
20+
public class RestoreItemTests : AzureBackupTestsBase
21+
{
22+
[Fact]
23+
public void RestoreAzureBackUpItem()
24+
{
25+
this.RunPowerShellTest("Test-RestoreAzureBackUpItem");
26+
}
27+
}
28+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$ResourceGroupName = "backuprg"
2+
$ResourceName = "backuprn"
3+
$ContainerName = "iaasvmcontainer;dev01testing;dev01testing"
4+
$ContainerType = "IaasVMContainer"
5+
$DataSourceType = "VM"
6+
$DataSourceId = "17593283453810"
7+
$Location = "southeastasia"
8+
$PolicyName = "Policy9";
9+
$PolicyId = "c87bbada-6e1b-4db2-b76c-9062d28959a4";
10+
$POName = "iaasvmcontainer;dev01testing;dev01testing"
11+
$ItemName = "iaasvmcontainer;dev01testing;dev01testing"
12+
$RecoveryPointName = "12520735098347"
13+
$StorageAccountName = "portalvhds7jzk3jty85qx5"
14+
15+
16+
function Test-RestoreAzureBackUpItem
17+
{
18+
$azureBackUpRecoveryPoint = New-Object Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupRecoveryPoint
19+
$azureBackUpRecoveryPoint.ResourceGroupName = $ResourceGroupName
20+
$azureBackUpRecoveryPoint.ResourceName = $ResourceName
21+
$azureBackUpRecoveryPoint.Location = $Location
22+
$azureBackUpRecoveryPoint.ContainerUniqueName = $ContainerName
23+
$azureBackUpRecoveryPoint.ItemName = $ItemName
24+
$azureBackUpRecoveryPoint.RecoveryPointName = $RecoveryPointName
25+
$jobId = Restore-AzureBackupItem -RecoveryPoint $azureBackUpRecoveryPoint -StorageAccountName $StorageAccountName
26+
}

0 commit comments

Comments
 (0)