File tree 5 files changed +3554
-0
lines changed
RecoveryServices.SiteRecovery/Utilities
RecoveryServices.SiteRecovery.Test
SessionRecords/RecoveryServices.SiteRecovery.Test.AsrA2ATests
5 files changed +3554
-0
lines changed Original file line number Diff line number Diff line change @@ -288,5 +288,15 @@ public void A2AClusterCommitFailoverJob()
288
288
$ "Import-Module { _testModule . AsAbsoluteLocation ( ) } ",
289
289
"Test-ClusterCommitFailoverJob" ) ;
290
290
}
291
+
292
+ [ Fact ]
293
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
294
+ public void A2AReprotectTest ( )
295
+ {
296
+ TestRunner . RunTestScript (
297
+ $ "Import-Module { _helperModule . AsAbsoluteLocation ( ) } ",
298
+ $ "Import-Module { _testModule . AsAbsoluteLocation ( ) } ",
299
+ "Test-A2ASingleVMReprotect" ) ;
300
+ }
291
301
}
292
302
}
Original file line number Diff line number Diff line change @@ -2185,4 +2185,35 @@ function Test-CRGReplication {
2185
2185
# Failover
2186
2186
$failoverjob = Start-AzRecoveryServicesAsrUnPlannedFailoverJob - ReplicationProtectedItem $pe - Direction PrimaryToRecovery - PerformSourceSideAction
2187
2187
WaitForJobCompletion - JobId $failoverjob.Name
2188
+ }
2189
+
2190
+ <#
2191
+ . SYNOPSIS
2192
+ Test-A2ASingleVMReprotect parametersets
2193
+ #>
2194
+ function Test-A2ASingleVMReprotect {
2195
+ $vault = Get-AzRecoveryServicesVault - Name " vijamireprotecttest" - ResourceGroupName " vijami-alertrg"
2196
+
2197
+ Set-AzRecoveryServicesAsrVaultContext - Vault $vault
2198
+
2199
+ $primaryfabric = Get-AzRecoveryServicesAsrFabric - Name asr- a2a- default- uksouth
2200
+
2201
+ $PrimaryProtContainer = Get-AzRecoveryServicesAsrProtectionContainer - Fabric $primaryfabric
2202
+
2203
+ $recoveryfabric = Get-AzRecoveryServicesAsrFabric - Name asr- a2a- default- ukwest
2204
+
2205
+ $RecoveryContainer = Get-AzRecoveryServicesAsrProtectionContainer - Fabric $recoveryfabric
2206
+
2207
+ $RecoveryMapping = Get-AzRecoveryServicesAsrProtectionContainerMapping - ProtectionContainer $RecoveryContainer - Name ukwest- uksouth- 24 - hour- retention- policy
2208
+
2209
+ $ReplicationProtectedItem = Get-AzRecoveryServicesAsrReplicationProtectedItem - FriendlyName " reprotectvm" - ProtectionContainer $PrimaryProtContainer
2210
+
2211
+ $CacheStorageAccount = " /subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/gl-rec-rg-prod-z2zgql-ukw/providers/Microsoft.Storage/storageAccounts/bootdiag0411052737"
2212
+
2213
+ $rgId = " /subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/vijami-alertrg"
2214
+
2215
+ $ReprotectJob = Update-AzRecoveryServicesAsrProtectionDirection - AzureToAzure - ReplicationProtectedItem $ReplicationProtectedItem - ProtectionContainerMapping $RecoveryMapping - LogStorageAccountId $CacheStorageAccount - RecoveryResourceGroupID $rgId
2216
+
2217
+ [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities ]::Wait(20 * 1000 )
2218
+ WaitForJobCompletion - JobId $ReprotectJob.Name
2188
2219
}
You can’t perform that action at this time.
0 commit comments