Skip to content

Commit c2ff3bd

Browse files
committed
Addressed PR comments
- clean up commented logic. - remove irrelavent comments.
1 parent ab62de1 commit c2ff3bd

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed

src/Sql/Sql.Test/ScenarioTests/Common.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ Gets the values of the parameters used in the Server Key Vault Key tests
305305
#>
306306
function Get-SqlServerKeyVaultKeyTestEnvironmentParameters ()
307307
{
308+
# Create a key vault with soft delete.configured
308309
return @{ rgName = Get-ResourceGroupName;
309310
serverName = Get-ServerName;
310311
databaseName = Get-DatabaseName;
@@ -363,11 +364,6 @@ function Get-ManagedInstanceForTdeTest ($params)
363364
$managedInstance = Create-ManagedInstanceForTest $rg $subnetId
364365
Set-AzKeyVaultAccessPolicy -VaultName $params.vaultName -ObjectId $managedInstance.Identity.PrincipalId -PermissionsToKeys get, list, wrapKey, unwrapKey
365366

366-
# $mangedInstanceRg = "BenjinResourceGroup"
367-
# $managedInstanceName = "benjinmitest"
368-
#
369-
# $managedInstance = Get-AzSqlInstance -Name $managedInstanceName -ResourceGroupName $mangedInstanceRg
370-
371367
return $managedInstance
372368
}
373369

src/Sql/Sql.Test/ScenarioTests/ManagedInstanceKeyVaultKeyTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ public void TestManagedInstanceKeyVaultKey()
5050
RunPowerShellTest("Test-ManagedInstanceKeyVaultKey");
5151
}
5252

53-
//Commenting out these tests because automated checks are failing when there
54-
//is [fact] tag even when there is no trait tag
55-
5653
[Fact]
5754
[Trait(Category.AcceptanceType, Category.CheckIn)]
5855
public void TestManagedInstanceKeyVaultKeyInputObject()

src/Sql/Sql.Test/ScenarioTests/ManagedInstanceProtectorTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ public void TestSetGetManagedInstanceEncryptionProtectorByokFailsWithoutKeyId()
5050
RunPowerShellTest("Test-SetGetManagedInstanceEncryptionProtectorByokFailsWithoutKeyId");
5151
}
5252

53-
// Commenting out these tests because automated checks are failing when there
54-
//is [fact] tag even when there is no trait tag
55-
5653
[Fact]
5754
[Trait(Category.AcceptanceType, Category.CheckIn)]
5855
public void TestSetGetManagedInstanceEncryptionProtectorServiceManaged()

src/Sql/Sql.Test/ScenarioTests/ServerKeyVaultKeyTests.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,9 @@ function Test-RemoveServerKeyVaultKey
8282
Assert-AreEqual $params.keyId $keyGet.Uri
8383
Assert-AreEqual $params.serverKeyName $keyGet.ServerKeyName
8484

85-
86-
$keyRemove = Remove-AzSqlServerKeyVaultKey -ServerName $params.serverName -ResourceGroupName $params.rgName -KeyId $params.keyId
87-
88-
# $job = Remove-AzSqlServerKeyVaultKey -ServerName $params.serverName -ResourceGroupName $params.rgName -KeyId $params.keyId -AsJob
89-
# $job | Wait-Job
90-
# $keyRemove = $job.Output
85+
$job = Remove-AzSqlServerKeyVaultKey -ServerName $params.serverName -ResourceGroupName $params.rgName -KeyId $params.keyId -AsJob
86+
$job | Wait-Job
87+
$keyRemove = $job.Output
9188

9289
Assert-AreEqual $params.serverKeyName $keyRemove.ServerKeyName
9390
Assert-AreEqual $params.keyId $keyRemove.Uri

0 commit comments

Comments
 (0)