Skip to content

Commit

Permalink
add changes for list connection strings response
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmsft committed Jun 5, 2023
1 parent 062a81e commit ff3ef0a
Show file tree
Hide file tree
Showing 5 changed files with 574 additions and 487 deletions.
11 changes: 8 additions & 3 deletions src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,17 @@ function Test-AccountRelatedCmdlets
Assert-NotNull $cosmosDBAccountKey

$cosmosDBAccountConnectionStrings = Get-AzCosmosDBAccountKey -Name $cosmosDBAccountName -ResourceGroupName $rgname -Type "ConnectionStrings"
Write-Output $cosmosDBAccountConnectionStrings
Assert-NotNull $cosmosDBAccountConnectionStrings
Assert-NotNull $cosmosDBAccountConnectionStrings.ConnectionStrings[0].KeyKind
Assert-NotNull $cosmosDBAccountConnectionStrings.ConnectionStrings[0].Type

for (($i = 0); $i -lt $cosmosDBAccountConnectionStrings.Count; $i++) {
Assert-NotNull $cosmosDBAccountConnectionStrings[$i].KeyKind
Assert-NotNull $cosmosDBAccountConnectionStrings[$i].Type
}

$cosmosDBAccountReadOnlyKeys = Get-AzCosmosDBAccountKey -Name $cosmosDBAccountName -ResourceGroupName $rgname -Type "ReadOnlyKeys"
Assert-NotNull $cosmosDBAccountReadOnlyKeys
Assert-NotNull $cosmosDBAccountReadOnlyKeys["PrimaryReadonlyMasterKey"]
Assert-NotNull $cosmosDBAccountReadOnlyKeys["SecondaryReadonlyMasterKey"]

$RegeneratedKey = New-AzCosmosDBAccountKey -Name $cosmosDBAccountName -ResourceGroupName $rgname -KeyKind "primary"
Assert-NotNull $RegeneratedKey
Expand Down
Loading

0 comments on commit ff3ef0a

Please sign in to comment.