Skip to content

adding remove disk api, introducing zone, network fields in enable protection #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: asr_a2a_bug_fixes_hotadd
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,31 @@ Function WaitForIRCompletion
$IRjobs
WaitForJobCompletion -JobId $IRjobs[0].Name -JobQueryWaitTimeInSeconds $JobQueryWaitTimeInSeconds -Message $("Finalize IR in Progress...")
}

Function WaitForAddDisksIRCompletion
{
param(
[PSObject] $affectedObjectId,
[int] $JobQueryWaitTimeInSeconds = 10
)
$isProcessingLeft = $true
$IRjobs = $null

Write-Host $("Add-Disk IR in Progress...") -ForegroundColor Yellow
do
{
$IRjobs = Get-AzureRmRecoveryServicesAsrJob -TargetObjectId $affectedObjectId | Sort-Object StartTime -Descending | select -First 2 | Where-Object{$_.JobType -eq "AddDisksIrCompletion"}
$isProcessingLeft = ($IRjobs -eq $null -or $IRjobs.Count -ne 1)

if($isProcessingLeft)
{
Write-Host $("Adddisk IR in Progress...") -ForegroundColor Yellow
Write-Host $("Waiting for: " + $JobQueryWaitTimeInSeconds.ToString + " Seconds") -ForegroundColor Yellow
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait($JobQueryWaitTimeInSeconds * 1000)
}
}While($isProcessingLeft)

Write-Host $("Finalize Add disk IR jobs:") -ForegroundColor Green
$IRjobs
WaitForJobCompletion -JobId $IRjobs[0].Name -JobQueryWaitTimeInSeconds $JobQueryWaitTimeInSeconds -Message $("Finalize IR in Progress...")
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,49 @@ public void A2ATestNewContainer()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-NewContainer");
}

#if NETSTANDARD
[Fact(Skip = "Needs investigation, TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client.")]
#else
[Fact]
#endif
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2ANewReplicationProtectedItemDisk()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-NewReplicationProtectedItem");
}

#if NETSTANDARD
[Fact(Skip = "Needs investigation, TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client.")]
#else
[Fact]
#endif
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2AAddReplicationProtectedItemDisk()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-AddReplicationProtectedItemDisk");
}

#if NETSTANDARD
[Fact(Skip = "Needs investigation, TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client.")]
#else
[Fact]
#endif
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2ARemoveReplicationProtectedItemDisk()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-RemoveReplicationProtectedItemDisk");
}

#if NETSTANDARD
[Fact(Skip = "Needs investigation, TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client.")]
#else
[Fact]
#endif
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void A2ARemoveReplicationProtectedItemHealthError()
{
this.RunPowerShellTest(_logger, Constants.NewModel, "Test-ResolveHealthError");
}
}
}
Loading