File tree Expand file tree Collapse file tree 4 files changed +62
-3
lines changed
src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests Expand file tree Collapse file tree 4 files changed +62
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ $Location = "SouthEast Asia"
8
8
$PolicyName = " Policy9" ;
9
9
$PolicyId = " c87bbada-6e1b-4db2-b76c-9062d28959a4" ;
10
10
$POName = " iaasvmcontainer;dev01testing;dev01testing"
11
+ $ItemName = " iaasvmcontainer;dev01testing;dev01testing"
11
12
12
13
13
14
function Test-BackUpAzureBackUpItem
@@ -17,8 +18,6 @@ function Test-BackUpAzureBackUpItem
17
18
$azureBackUpItem.ResourceName = $ResourceName
18
19
$azureBackUpItem.Location = $Location
19
20
$azureBackUpItem.ContainerUniqueName = $ContainerName
20
- $azureBackUpItem.ContainerType = $ContainerType
21
- $azureBackUpItem.DataSourceId = $DataSourceId
22
- $azureBackUpItem.Type = $DataSourceType
21
+ $azureBackUpItem.ItemName = $ItemName
23
22
$jobId = Backup-AzureBackupItem - Item $azureBackUpItem
24
23
}
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests
19
19
{
20
20
public class RecoveryPointTests : AzureBackupTestsBase
21
21
{
22
+ [ Fact ]
23
+ public void GetRecoveryPointsTests ( )
24
+ {
25
+ this . RunPowerShellTest ( "Test-GetAzureRecoveryPoints" ) ;
26
+ }
27
+
22
28
[ Fact ]
23
29
public void GetRecoveryPointTests ( )
24
30
{
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments