Skip to content

Commit 177a5e5

Browse files
committed
Adding correct session records to Test project after test was renamed. Fixing Set-AzureRmSqlServerTransparentDataEncryptionProtector to include ResourceGroupName and ServerName in the model update.
1 parent e2e3cbd commit 177a5e5

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,10 +724,10 @@
724724
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.TransparentDataEncryptionCrudTests\TestDatabaseTransparentDataEncryptionUpdate.json">
725725
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
726726
</None>
727-
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.TransparentDataEncryptionCrudTests\TestDatabaseTransparentDataEncryptionProtectorGet.json">
727+
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.TransparentDataEncryptionCrudTests\TestServerTransparentDataEncryptionProtectorGet.json">
728728
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
729729
</None>
730-
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.TransparentDataEncryptionCrudTests\TestDatabaseTransparentDataEncryptionProtectorSet.json">
730+
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.TransparentDataEncryptionCrudTests\TestServerTransparentDataEncryptionProtectorSet.json">
731731
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
732732
</None>
733733
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerKeyVaultKeyTests\TestServerKeyVaultKeyAdd.json">

src/ResourceManager/Sql/Commands.Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlServerTransparentDataEncryptionProtector.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,17 @@ public class SetAzureSqlServerTransparentDataEncryptionProtector : AzureSqlServe
6262
/// <returns>The model to send to the update</returns>
6363
protected override IEnumerable<Model.AzureSqlServerTransparentDataEncryptionProtectorModel> ApplyUserInputToModel(IEnumerable<Model.AzureSqlServerTransparentDataEncryptionProtectorModel> model)
6464
{
65-
// Construct a new entity so we only send the relevant data to the server
66-
List<Model.AzureSqlServerTransparentDataEncryptionProtectorModel> updateData = new List<Model.AzureSqlServerTransparentDataEncryptionProtectorModel>();
65+
List<Model.AzureSqlServerTransparentDataEncryptionProtectorModel> newEntity = new List<Model.AzureSqlServerTransparentDataEncryptionProtectorModel>();
6766

68-
updateData.Add(new Model.AzureSqlServerTransparentDataEncryptionProtectorModel()
67+
newEntity.Add(new Model.AzureSqlServerTransparentDataEncryptionProtectorModel()
6968
{
69+
ResourceGroupName = this.ResourceGroupName,
70+
ServerName = this.ServerName,
7071
Type = this.Type,
7172
ServerKeyVaultKeyName = AzureSqlServerKeyVaultKeyModel.CreateServerKeyNameFromKeyId(this.KeyId),
7273
KeyId = this.KeyId
7374
});
74-
return updateData;
75+
return newEntity;
7576
}
7677

7778
/// <summary>

0 commit comments

Comments
 (0)