Skip to content

Commit fdecb11

Browse files
amar-sagarevinhmsCaptainFanZzzv-yuzhichenZiyue Zheng
authored
Add powershell APIs for Partition merge and Throughput redistribution (#18247)
* partition merge powershell cmdlet * Delete PartitionInfoGetResults * add pitr lite support * fix update continuoustier and tests * add test recording * Partition merge powershell cmdlets and tests * Add RedisCacheTestRunner and replace Controller (#18222) * Add PrivateDnsTestRunner and replace TestBase (#18202) * Add ReservationsTestRunner and replace TestController (#18226) * Add ResourceGraphTestRunner to replace TestController (#18227) * Signed-off-by: [email protected] <[email protected]> * Add ResourceGraphTestRunner to replace TestController * Add SecurityInsightsTestRunner and replace TestController (#18228) * Signed-off-by: [email protected] <[email protected]> (#18229) * Add ServiceFabricTestRunner and replace TestController (#18231) * Add SignalRTestRunner to replace TestController (#18232) * powershell changes * Add SupportTestRunner to replace TestController (#18188) * Add SupportTestRunner to replace TestController * Revert Az.Support document changes * Add SecurityTestRunner to replace TestController (#18189) * Add SecurityTestRunner to replace TestController * Revert Az.Security document changes * Add IotHubTestRunner to replace IotHubController (#18200) * Add MonitorTestRunner to replace TestsController (#18201) * Add TrafficManagerTestRunner to replace TestController (#18243) * Add more tests and fixes * Fix merge conflicts and documentation * revert non cosmosdb changes * Fix confirmation message * Update NuGet.Config * suppressions * Fix missing parameter * converted tests to manual verification Co-authored-by: Vinh Trinh <[email protected]> Co-authored-by: Yufan Yang <[email protected]> Co-authored-by: v-yuzhichen <[email protected]> Co-authored-by: Ziyue Zheng <[email protected]> Co-authored-by: Yunchi Wang <[email protected]>
1 parent fbaa9e8 commit fdecb11

File tree

153 files changed

+17200
-4932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+17200
-4932
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<PsModuleName>CosmosDB</PsModuleName>
44
</PropertyGroup>
55
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.Test.props" />
66
<ItemGroup>
77
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
8-
<PackageReference Include="Microsoft.Azure.Management.CosmosDB" Version="3.7.0-preview" />
8+
<PackageReference Include="Microsoft.Azure.Management.CosmosDB" Version="3.8.0-preview" />
99
<PackageReference Include="Microsoft.Azure.Management.Network" Version="22.0.0" />
1010
</ItemGroup>
1111
</Project>

src/CosmosDB/CosmosDB.Test/ScenarioTests/MongoOperationsTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,19 @@ public void TestMongoMigrateThroughputCmdlets()
5050
{
5151
TestRunner.RunTestScript("Test-MongoMigrateThroughputCmdlets");
5252
}
53+
54+
[Fact(Skip = "Cannot acquire token credential for a specific audience. No support from test framework. I have verified the tests manually.")]
55+
[Trait(Category.AcceptanceType, Category.CheckIn)]
56+
public void TestMongoDBCollectionThroughputRedistributionCmdlet()
57+
{
58+
TestRunner.RunTestScript("Test-MongoDBCollectionAdaptiveRUCmdlets");
59+
}
60+
61+
[Fact(Skip = "Cannot acquire token credential for a specific audience. No support from test framework. I have verified the tests manually.")]
62+
[Trait(Category.AcceptanceType, Category.CheckIn)]
63+
public void TestMongoDBCollectionMergeCmdlet()
64+
{
65+
TestRunner.RunTestScript("Test-MongoDBCollectionMergeCmdlet");
66+
}
5367
}
5468
}

src/CosmosDB/CosmosDB.Test/ScenarioTests/MongoOperationsTests.ps1

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,4 +445,111 @@ function Test-MongoMigrateThroughputCmdlets
445445
Remove-AzCosmosDBMongoDBCollection -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Name $CollectionName
446446
Remove-AzCosmosDBMongoDBDatabase -AccountName $AccountName -ResourceGroupName $rgName -Name $DatabaseName
447447
}
448+
}
449+
450+
<#
451+
.SYNOPSIS
452+
Test mongodb Throughput redistribution cmdlets
453+
#>
454+
function Test-MongoDBCollectionAdaptiveRUCmdlets
455+
{
456+
$AccountName = "mongomergeaccount"
457+
$rgName = "canary-sdk-test"
458+
$DatabaseName = "adaptiverudatabase"
459+
$ContainerName = "adaptiveruContainer"
460+
461+
$ShardKey = "shardKeyPath"
462+
$ContainerThroughputValue = 24000
463+
$UpdatedContainerThroughputValue = 2000
464+
465+
Try{
466+
467+
New-AzCosmosDBMongoDBDatabase -AccountName $AccountName -ResourceGroupName $rgName -Name $DatabaseName
468+
New-AzCosmosDBMongoDBCollection -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Throughput $ContainerThroughputValue -Name $ContainerName -Shard $ShardKey
469+
Update-AzCosmosDBMongoDBCollectionThroughput -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Name $ContainerName -Throughput $UpdatedContainerThroughputValue
470+
$partitions = Get-AzCosmosDBMongoDBCollectionPerPartitionThroughput -ResourceGroupName $rgName -AccountName $AccountName -DatabaseName $DatabaseName -Name $ContainerName -AllPartitions
471+
Assert-AreEqual $partitions.Count 4
472+
$sources = @()
473+
$targets = @()
474+
Foreach($partition in $partitions)
475+
{
476+
Assert-AreEqual $partition.Throughput 500
477+
if($partition.Id -lt 2)
478+
{
479+
$throughput = $partition.Throughput - 100
480+
$sources += New-AzCosmosDBPhysicalPartitionThroughputObject -Id $partition.Id -Throughput $throughput
481+
}
482+
else
483+
{
484+
$throughput = $partition.Throughput + 100
485+
$targets += New-AzCosmosDBPhysicalPartitionThroughputObject -Id $partition.Id -Throughput $throughput
486+
}
487+
}
488+
489+
$newPartitions = Update-AzCosmosDBMongoDBCollectionPerPartitionThroughput -ResourceGroupName $rgName -AccountName $AccountName -DatabaseName $DatabaseName -Name $ContainerName -SourcePhysicalPartitionThroughputObject $sources -TargetPhysicalPartitionThroughputObject $targets
490+
Assert-AreEqual $newPartitions.Count 4
491+
Foreach($partition in $newPartitions)
492+
{
493+
if($partition.Id -lt 2)
494+
{
495+
Assert-AreEqual $partition.Throughput 400
496+
}
497+
else
498+
{
499+
Assert-AreEqual $partition.Throughput 600
500+
}
501+
}
502+
503+
$resetPartitions = Update-AzCosmosDBMongoDBCollectionPerPartitionThroughput -ResourceGroupName $rgName -AccountName $AccountName -DatabaseName $DatabaseName -Name $ContainerName -EqualDistributionPolicy
504+
505+
Assert-AreEqual $resetPartitions.Count 4
506+
507+
Foreach($partition in $resetPartitions)
508+
{
509+
Assert-AreEqual $partition.Throughput 500
510+
}
511+
512+
$somePartitions = Get-AzCosmosDBMongoDBCollectionPerPartitionThroughput -ResourceGroupName $rgName -AccountName $AccountName -DatabaseName $DatabaseName -Name $ContainerName -PhysicalPartitionIds ('0', '1')
513+
Assert-AreEqual $somePartitions.Count 2
514+
}
515+
Finally{
516+
Remove-AzCosmosDBMongoDBCollection -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Name $ContainerName
517+
Remove-AzCosmosDBMongoDBDatabase -AccountName $AccountName -ResourceGroupName $rgName -Name $DatabaseName
518+
}
519+
}
520+
521+
522+
<#
523+
.SYNOPSIS
524+
Test mongodb merge cmdlet
525+
#>
526+
function Test-MongoDBCollectionMergeCmdlet
527+
{
528+
$AccountName = "mongomergeaccount"
529+
$rgName = "canary-sdk-test"
530+
$DatabaseName = "mergedatabase"
531+
$ContainerName = "mergecontainer"
532+
533+
$ShardKey = "shardKeyPath"
534+
535+
$ContainerThroughputValue = 24000
536+
$UpdatedContainerThroughputValue = 2000
537+
538+
Try{
539+
540+
New-AzCosmosDBMongoDBDatabase -AccountName $AccountName -ResourceGroupName $rgName -Name $DatabaseName
541+
New-AzCosmosDBMongoDBCollection -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Throughput $ContainerThroughputValue -Name $ContainerName -Shard $ShardKey
542+
Update-AzCosmosDBMongoDBCollectionThroughput -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Name $ContainerName -Throughput $UpdatedContainerThroughputValue
543+
$physicalPartitionStorageInfos = Invoke-AzCosmosDBMongoDBCollectionMerge -ResourceGroupName $rgName -AccountName $AccountName -DatabaseName $DatabaseName -Name $ContainerName -Force
544+
Assert-AreEqual $physicalPartitionStorageInfos.Count 1
545+
if($physicalPartitionStorageInfos[0].Id.contains("mergeTarget"))
546+
{
547+
throw "Name of partition: " + $physicalPartitionStorageInfos[0].Id + " Unexpected Id: mergeTarget"
548+
}
549+
550+
}
551+
Finally{
552+
Remove-AzCosmosDBMongoDBCollection -AccountName $AccountName -ResourceGroupName $rgName -DatabaseName $DatabaseName -Name $ContainerName
553+
Remove-AzCosmosDBMongoDBDatabase -AccountName $AccountName -ResourceGroupName $rgName -Name $DatabaseName
554+
}
448555
}

src/CosmosDB/CosmosDB.Test/ScenarioTests/RestoreTests.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,23 @@ public void TestMongoDBCollectionBackupInformationCmdLets()
6767

6868
[Fact]
6969
[Trait(Category.AcceptanceType, Category.CheckIn)]
70-
public void TestUpdateCosmosDBAccountBackupPolicyCmdLet()
70+
public void TestUpdateCosmosDBAccountBackupPolicyToContinuous30DaysCmdLets()
7171
{
72-
TestRunner.RunTestScript("Test-UpdateCosmosDBAccountBackupPolicyCmdLet");
72+
TestRunner.RunTestScript( "Test-UpdateCosmosDBAccountBackupPolicyToContinuous30DaysCmdLets");
73+
}
74+
75+
[Fact]
76+
[Trait(Category.AcceptanceType, Category.CheckIn)]
77+
public void TestUpdateCosmosDBAccountBackupPolicyToContinuous7DaysCmdLets()
78+
{
79+
TestRunner.RunTestScript("Test-UpdateCosmosDBAccountBackupPolicyToContinuous7DaysCmdLets");
80+
}
81+
82+
[Fact]
83+
[Trait(Category.AcceptanceType, Category.CheckIn)]
84+
public void TestProvisionCosmosDBAccountBackupPolicyWithContinuous7DaysCmdLets()
85+
{
86+
TestRunner.RunTestScript("Test-ProvisionCosmosDBAccountBackupPolicyWithContinuous7DaysCmdLets");
7387
}
7488
}
7589
}

src/CosmosDB/CosmosDB.Test/ScenarioTests/RestoreTests.ps1

Lines changed: 120 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function Test-RestoreFromNewAccountCmdlets {
4444
Assert-AreEqual $sourceRestorableAccount.DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
4545
Assert-NotNull $sourceRestorableAccount.DatabaseAccountName
4646
Assert-NotNull $sourceRestorableAccount.CreationTime
47+
Assert-NotNull $sourceRestorableAccount.OldestRestorableTime
4748

4849
$restorableSqlDatabases = Get-AzCosmosDBSqlRestorableDatabase -Location $sourceCosmosDBAccount.Location -DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
4950
Assert-NotNull $restorableSqlDatabases
@@ -139,6 +140,7 @@ function Test-MongoRestoreAccountCmdlets {
139140
Assert-AreEqual $sourceRestorableAccount.DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
140141
Assert-NotNull $sourceRestorableAccount.DatabaseAccountName
141142
Assert-NotNull $sourceRestorableAccount.CreationTime
143+
Assert-NotNull $sourceRestorableAccount.OldestRestorableTime
142144

143145
$NewDatabase = New-AzCosmosDBMongoDBDatabase -AccountName $sourceCosmosDBAccountName -ResourceGroupName $rgName -Name $databaseName -Throughput $ThroughputValue
144146
$NewCollection = New-AzCosmosDBMongoDBCollection -AccountName $sourceCosmosDBAccountName -ResourceGroupName $rgName -DatabaseName $databaseName -Throughput $CollectionThroughputValue -Name $CollectionName -Shard $ShardKey
@@ -218,6 +220,7 @@ function Test-RestoreFailuresAccountCmdlets {
218220
Assert-AreEqual $sourceRestorableAccount.DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
219221
Assert-NotNull $sourceRestorableAccount.DatabaseAccountName
220222
Assert-NotNull $sourceRestorableAccount.CreationTime
223+
Assert-NotNull $sourceRestorableAccount.OldestRestorableTime
221224

222225
$restorableSqlDatabases = Get-AzCosmosDBSqlRestorableDatabase -Location $sourceCosmosDBAccount.Location -DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
223226
Assert-NotNull $restorableSqlDatabases
@@ -246,9 +249,9 @@ function Test-RestoreFailuresAccountCmdlets {
246249
}
247250

248251
function Test-SqlContainerBackupInformationCmdLets {
249-
$rgName = "CosmosDBResourceGroup14"
252+
$rgName = "CosmosDBResourceGroup52"
250253
$location = "Central US"
251-
$cosmosDBAccountName = "cosmosdb-1214"
254+
$cosmosDBAccountName = "cosmosdb-1252"
252255
$databaseName = "TestDB1";
253256
$collectionName = "TestCollectionInDB1";
254257
$apiKind = "Sql"
@@ -326,10 +329,10 @@ function Test-MongoDBCollectionBackupInformationCmdLets {
326329
Assert-NotNull $backupInfo.LatestRestorableTimestamp
327330
}
328331

329-
function Test-UpdateCosmosDBAccountBackupPolicyCmdLet {
330-
$rgName = "CosmosDBResourceGroup20"
332+
function Test-UpdateCosmosDBAccountBackupPolicyToContinuous30DaysCmdLets {
333+
$rgName = "PSCosmosDBResourceGroup20"
331334
$location = "Central US"
332-
$cosmosDBAccountName = "cosmosdb-1220"
335+
$cosmosDBAccountName = "ps-cosmosdb-1220"
333336
$apiKind = "Sql"
334337
$consistencyLevel = "Session"
335338
$locations = @()
@@ -345,11 +348,122 @@ function Test-UpdateCosmosDBAccountBackupPolicyCmdLet {
345348
}
346349

347350
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -BackupPolicyType Continuous
348-
Start-Sleep -s 50
351+
Start-Sleep -s (60)
349352

350353
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
351354
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState
352355
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status
353356
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.TargetType
354357
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.StartTime
358+
359+
Start-Sleep -s (60 * 5)
360+
361+
while (
362+
$updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status -ne "Completed" -and
363+
$updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status -ne "Failed" -and
364+
$updatedCosmosDBAccount.BackupPolicy.BackupType -ne "Continuous")
365+
{
366+
Start-Sleep -s 60
367+
368+
# keep polling the migration Status
369+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
370+
}
371+
372+
Assert-AreEqual "Continuous" $updatedCosmosDBAccount.BackupPolicy.BackupType
373+
Assert-AreEqual "Continuous30Days" $updatedCosmosDBAccount.BackupPolicy.Tier
374+
375+
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -BackupPolicyType Continuous -ContinuousTier Continuous7Days
376+
Start-Sleep -s (60 * 2)
377+
378+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
379+
Assert-AreEqual "Continuous" $updatedCosmosDBAccount.BackupPolicy.BackupType
380+
Assert-AreEqual "Continuous7Days" $updatedCosmosDBAccount.BackupPolicy.Tier
381+
}
382+
383+
function Test-UpdateCosmosDBAccountBackupPolicyToContinuous7DaysCmdLets {
384+
$rgName = "PSCosmosDBResourceGroup50"
385+
$location = "Central US"
386+
$cosmosDBAccountName = "ps-cosmosdb-1250"
387+
$apiKind = "Sql"
388+
$consistencyLevel = "Session"
389+
$locations = @()
390+
$locations += New-AzCosmosDBLocationObject -Location $location -FailoverPriority 0 -IsZoneRedundant 0
391+
392+
$resourceGroup = New-AzResourceGroup -ResourceGroupName $rgName -Location $location
393+
394+
Try {
395+
New-AzCosmosDBAccount -ResourceGroupName $rgName -LocationObject $locations -Name $cosmosDBAccountName -ApiKind $apiKind -DefaultConsistencyLevel $consistencyLevel
396+
}
397+
Catch {
398+
Assert-AreEqual $_.Exception.Message ("Resource with Name " + $cosmosDBAccountName + " already exists.")
399+
}
400+
401+
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -BackupPolicyType Continuous -ContinuousTier Continuous7Days
402+
Start-Sleep -s (60)
403+
404+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
405+
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState
406+
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status
407+
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.TargetType
408+
Assert-NotNull $updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.StartTime
409+
410+
Start-Sleep -s (60 * 5)
411+
412+
while (
413+
$updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status -ne "Completed" -and
414+
$updatedCosmosDBAccount.BackupPolicy.BackupPolicyMigrationState.Status -ne "Failed" -and
415+
$updatedCosmosDBAccount.BackupPolicy.BackupType -ne "Continuous")
416+
{
417+
Start-Sleep -s 60
418+
419+
# keep polling the migration Status
420+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
421+
}
422+
423+
Assert-AreEqual "Continuous" $updatedCosmosDBAccount.BackupPolicy.BackupType
424+
Assert-AreEqual "Continuous7Days" $updatedCosmosDBAccount.BackupPolicy.Tier
425+
426+
# If we don't provide the continuoustier, it should not trigger the update to continuous30days
427+
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
428+
Start-Sleep -s (60 * 2)
429+
430+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
431+
Assert-AreEqual "Continuous7Days" $updatedCosmosDBAccount.BackupPolicy.Tier
432+
433+
# Provide continuoustier explicitly, it should triggered the update to continuous30days
434+
$updatedCosmosDBAccount = Update-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -BackupPolicyType Continuous -ContinuousTier Continuous30Days
435+
Start-Sleep -s (60 * 2)
436+
437+
$updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName
438+
Assert-AreEqual "Continuous" $updatedCosmosDBAccount.BackupPolicy.BackupType
439+
Assert-AreEqual "Continuous30Days" $updatedCosmosDBAccount.BackupPolicy.Tier
440+
}
441+
442+
function Test-ProvisionCosmosDBAccountBackupPolicyWithContinuous7DaysCmdLets {
443+
#use an existing account with the following information
444+
$rgName = "PSCosmosDBResourceGroup51"
445+
$location = "West US"
446+
$sourceCosmosDBAccountName = "ps-cosmosdb-1251"
447+
$consistencyLevel = "Session"
448+
$apiKind = "Sql"
449+
$locations = @()
450+
$locations += New-AzCosmosDBLocationObject -Location "West Us" -FailoverPriority 0 -IsZoneRedundant 0
451+
452+
$resourceGroup = New-AzResourceGroup -ResourceGroupName $rgName -Location $location
453+
New-AzCosmosDBAccount -ResourceGroupName $rgName -LocationObject $locations -Name $sourceCosmosDBAccountName -ApiKind $apiKind -DefaultConsistencyLevel $consistencyLevel -BackupPolicyType Continuous -ContinuousTier Continuous7Days
454+
455+
$sourceCosmosDBAccount = Get-AzCosmosDBAccount -Name $sourceCosmosDBAccountName -ResourceGroupName $rgName
456+
Assert-AreEqual "Continuous" $sourceCosmosDBAccount.BackupPolicy.BackupType
457+
Assert-AreEqual "Continuous7Days" $sourceCosmosDBAccount.BackupPolicy.Tier
458+
459+
$sourceRestorableAccount = Get-AzCosmosDBRestorableDatabaseAccount -Location $sourceCosmosDBAccount.Location -DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
460+
Assert-NotNull $sourceRestorableAccount.Id
461+
Assert-NotNull $sourceRestorableAccount.Location
462+
Assert-NotNull $sourceRestorableAccount.DatabaseAccountInstanceId
463+
Assert-NotNull $sourceRestorableAccount.RestorableLocations
464+
Assert-AreEqual $sourceRestorableAccount.RestorableLocations.Count 1
465+
Assert-AreEqual $sourceRestorableAccount.DatabaseAccountInstanceId $sourceCosmosDBAccount.InstanceId
466+
Assert-NotNull $sourceRestorableAccount.DatabaseAccountName
467+
Assert-NotNull $sourceRestorableAccount.CreationTime
468+
Assert-NotNull $sourceRestorableAccount.OldestRestorableTime
355469
}

src/CosmosDB/CosmosDB.Test/ScenarioTests/SqlOperationsTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,19 @@ public void TestClientEncryptionKeyCmdletsUsingInputObject()
7171
{
7272
TestRunner.RunTestScript("Test-ClientEncryptionKeyCmdletsUsingInputObject");
7373
}
74+
75+
[Fact(Skip = "Cannot acquire token credential for a specific audience. No support from test framework. I have verified the tests manually.")]
76+
[Trait(Category.AcceptanceType, Category.CheckIn)]
77+
public void TestSqlContainerMergeCmdlet()
78+
{
79+
TestRunner.RunTestScript("Test-SqlContainerMergeCmdlet");
80+
}
81+
82+
[Fact(Skip = "Cannot acquire token credential for a specific audience. No support from test framework. I have verified the tests manually.")]
83+
[Trait(Category.AcceptanceType, Category.CheckIn)]
84+
public void TestSqlContainerAdaptiveRUCmdlets()
85+
{
86+
TestRunner.RunTestScript("Test-SqlContainerAdaptiveRUCmdlets");
87+
}
7488
}
7589
}

0 commit comments

Comments
 (0)