Skip to content

Commit f2d5118

Browse files
committed
Fix test and build issues
1 parent 7583bc9 commit f2d5118

File tree

3 files changed

+8
-43
lines changed

3 files changed

+8
-43
lines changed

src/Sql/Sql.Test/ScenarioTests/TransparentDataEncryptionCrudTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,5 @@ public void TestServerTransparentDataEncryptionProtectorSet()
5555
{
5656
RunPowerShellTest("Test-SetTransparentDataEncryptionProtector");
5757
}
58-
59-
[Fact]
60-
[Trait(Category.AcceptanceType, Category.CheckIn)]
61-
public void TestServerTransparentDataEncryptionProtectorSetWithKeyRotation()
62-
{
63-
RunPowerShellTest("Test-SetTransparentDataEncryptionProtectorWithKeyRotation");
64-
}
6558
}
6659
}

src/Sql/Sql/Common/ResourceIdentityHelper.cs

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,7 @@ public enum ResourceIdentityType
2727
}
2828

2929
public class ResourceIdentityHelper
30-
{
31-
public static Management.Sql.Models.ResourceIdentity GetIdentityObjectFromType(string AssignIdentity, List<string> userAssignedIdentities)
32-
{
33-
Management.Sql.Models.ResourceIdentity identityResult = null;
34-
35-
if (AssignIdentity.Equals(ResourceIdentityType.SystemAssigned))
36-
{
37-
identityResult = new Management.Sql.Models.ResourceIdentity()
38-
{
39-
Type = ResourceIdentityType.SystemAssigned.ToString()
40-
};
41-
}
42-
43-
if (AssignIdentity.Equals(ResourceIdentityType.UserAssigned) && userAssignedIdentities.Any())
44-
{
45-
Dictionary<string, UserIdentity> umiDict = new Dictionary<string, UserIdentity>();
46-
47-
foreach (string identity in userAssignedIdentities)
48-
{
49-
umiDict.Add(identity, new UserIdentity());
50-
}
51-
52-
identityResult = new Management.Sql.Models.ResourceIdentity()
53-
{
54-
Type = ResourceIdentityType.UserAssigned.ToString(),
55-
UserAssignedIdentities = umiDict
56-
};
57-
}
58-
59-
return identityResult;
60-
}
61-
30+
{
6231
public static Management.Sql.Models.ResourceIdentity GetIdentityObjectFromType(bool assignIdentityIsPresent, bool userAssignedIdentityIsPresent, List<string> userAssignedIdentities)
6332
{
6433
Management.Sql.Models.ResourceIdentity identityResult = null;
@@ -95,6 +64,13 @@ public static Management.Sql.Models.ResourceIdentity GetIdentityObjectFromType(b
9564
Type = ResourceIdentityType.SystemAssigned.ToString()
9665
};
9766
}
67+
else if (!assignIdentityIsPresent && !userAssignedIdentityIsPresent)
68+
{
69+
identityResult = new Management.Sql.Models.ResourceIdentity()
70+
{
71+
Type = ResourceIdentityType.None.ToString()
72+
};
73+
}
9874

9975
return identityResult;
10076
}

src/Sql/Sql/Sql.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.53.0-preview" />
2525
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
2626
</ItemGroup>
27-
28-
<ItemGroup>
29-
<Reference Include="D:\repos\azure-sdk-for-net\artifacts\bin\Microsoft.Azure.Management.Sql\Debug\net461\Microsoft.Azure.Management.Sql.dll" />
30-
</ItemGroup>
3127

3228
<ItemGroup>
3329
<ProjectReference Include="..\Sql.LegacySdk\Sql.LegacySdk.csproj" />

0 commit comments

Comments
 (0)