Skip to content

Commit 7372caa

Browse files
authored
Merge pull request Azure#6508 from nivimsft/uploadCustomerTdeCertificate2
Adding new Cmdlets for Management.Sql to allow customers to add TDE…
2 parents 97187bd + d347215 commit 7372caa

File tree

30 files changed

+10415
-7
lines changed

30 files changed

+10415
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.15.0-preview" />
29+
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.18.0-preview" />
3030
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.1.0-preview" />
3131
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.2.0-preview" />
3232
</ItemGroup>

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</Reference>
7979
<Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8080
<SpecificVersion>False</SpecificVersion>
81-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.15.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
81+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.18.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
8282
<Private>True</Private>
8383
</Reference>
8484
<Reference Include="Microsoft.Azure.Management.Storage">
@@ -171,6 +171,7 @@
171171
<DesignTime>True</DesignTime>
172172
<DependentUpon>Resources.resx</DependentUpon>
173173
</Compile>
174+
<Compile Include="ScenarioTests\AddTransparentDataEncryptionCertificateTests.cs" />
174175
<Compile Include="ScenarioTests\BlobAuditingTests.cs" />
175176
<Compile Include="ScenarioTests\BlobAuditingClassicStorageTests.cs" />
176177
<Compile Include="ScenarioTests\AuditingClassicStorageTests.cs" />
@@ -188,6 +189,9 @@
188189
<Compile Include="ScenarioTests\DatabaseReplicationTests.cs" />
189190
<Compile Include="ScenarioTests\DatabaseCrudTests.cs" />
190191
<Compile Include="ScenarioTests\DataMaskingTests.cs" />
192+
<None Include="ScenarioTests\AddTransparentDataEncryptionCertificateTests.ps1">
193+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
194+
</None>
191195
<None Include="ScenarioTests\BlobAuditingTests.ps1">
192196
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
193197
</None>
@@ -992,6 +996,27 @@
992996
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ServerDnsAliasTests\TestServerDnsAliasRemove.json">
993997
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
994998
</None>
999+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerDefaultParameterSetNoPassword.json">
1000+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1001+
</None>
1002+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerDefaultParameterSetWithPassword.json">
1003+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1004+
</None>
1005+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerInputObjectParameterSetNoPassword.json">
1006+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1007+
</None>
1008+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerInputObjectParameterSetWithPassword.json">
1009+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1010+
</None>
1011+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerResourceIdParameterSetNoPassword.json">
1012+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1013+
</None>
1014+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerResourceIdParameterSetWithPassword.json">
1015+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1016+
</None>
1017+
<None Include=".\SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AddTransparentDataEncryptionCertificateTests\TestAddTdeCertificateForSqlServerWithPiping.json">
1018+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1019+
</None>
9951020
</ItemGroup>
9961021
<ItemGroup>
9971022
<EmbeddedResource Include="Properties\Resources.resx">
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.ScenarioTest.SqlTests;
16+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18+
using Xunit;
19+
using Xunit.Abstractions;
20+
21+
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests
22+
{
23+
public class AddTransparentDataEncryptionCertificateTests : SqlTestsBase
24+
{
25+
public AddTransparentDataEncryptionCertificateTests(ITestOutputHelper output) : base(output)
26+
{
27+
}
28+
29+
[Fact]
30+
[Trait(Category.AcceptanceType, Category.CheckIn)]
31+
public void TestAddTdeCertificateForSqlServerDefaultParameterSetNoPassword()
32+
{
33+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerDefaultParameterSetNoPassword");
34+
}
35+
36+
[Fact]
37+
[Trait(Category.AcceptanceType, Category.CheckIn)]
38+
public void TestAddTdeCertificateForSqlServerDefaultParameterSetWithPassword()
39+
{
40+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerDefaultParameterSetWithPassword");
41+
}
42+
43+
[Fact(Skip = "Skip due to long setup time for managed instance")]
44+
[Trait(Category.AcceptanceType, Category.CheckIn)]
45+
public void TestAddTdeCertificateForManagedInstanceDefaultParameterSetNoPassword()
46+
{
47+
RunPowerShellTest("Test-AddTdeCertificateForManagedInstanceDefaultParameterSetNoPassword");
48+
}
49+
50+
[Fact(Skip = "Skip due to long setup time for managed instance")]
51+
[Trait(Category.AcceptanceType, Category.CheckIn)]
52+
public void TestAddTdeCertificateForManagedInstanceDefaultParameterSetWithPassword()
53+
{
54+
RunPowerShellTest("Test-AddTdeCertificateForManagedInstanceDefaultParameterSetWithPassword");
55+
}
56+
57+
[Fact]
58+
[Trait(Category.AcceptanceType, Category.CheckIn)]
59+
public void TestAddTdeCertificateForSqlServerInputObjectParameterSetWithPassword()
60+
{
61+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerInputObjectParameterSetWithPassword");
62+
}
63+
64+
[Fact]
65+
[Trait(Category.AcceptanceType, Category.CheckIn)]
66+
public void TestAddTdeCertificateForSqlServerResourceIdParameterSetWithPassword()
67+
{
68+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerResourceIdParameterSetWithPassword");
69+
}
70+
71+
[Fact]
72+
[Trait(Category.AcceptanceType, Category.CheckIn)]
73+
public void TestAddTdeCertificateForSqlServerInputObjectParameterSetNoPassword()
74+
{
75+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerInputObjectParameterSetNoPassword");
76+
}
77+
78+
[Fact]
79+
[Trait(Category.AcceptanceType, Category.CheckIn)]
80+
public void TestAddTdeCertificateForSqlServerResourceIdParameterSetNoPassword()
81+
{
82+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerResourceIdParameterSetNoPassword");
83+
}
84+
85+
[Fact]
86+
[Trait(Category.AcceptanceType, Category.CheckIn)]
87+
public void TestAddTdeCertificateForSqlServerWithPiping()
88+
{
89+
RunPowerShellTest("Test-AddTdeCertificateForSqlServerWithPiping");
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)