Skip to content

Commit

Permalink
Small cosmetic changes to address Jared
Browse files Browse the repository at this point in the history
  • Loading branch information
maboja-msft committed Oct 19, 2017
1 parent 210d83d commit 5a5e426
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageId>Microsoft.Azure.Management.Sql</PackageId>
<Description>Azure SQL Management SDK library</Description>
<AssemblyName>Microsoft.Azure.Management.Sql</AssemblyName>
<VersionPrefix>1.9.0-preview</VersionPrefix>
<VersionPrefix>1.8.0-preview</VersionPrefix>
<PackageTags>Microsoft Azure SQL Management;SQL;SQL Management</PackageTags>
</PropertyGroup>
<PropertyGroup>
Expand All @@ -13,6 +13,7 @@
<![CDATA[
New features:
- Added support for state and migration flag properties for SQL Vnet rules
- Added support for Server DNS Alias feature
]]>
</PackageReleaseNotes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[assembly: AssemblyTitle("Microsoft Azure SQL Management Library")]
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure SQL.")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")]



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void TestCrudServerDnsAlias()
// Create server dns alias pointing to sourceServer
//
var serverDnsAlias = sqlClient.ServerDnsAliases.CreateOrUpdate(resourceGroup.Name, sourceServer.Name, serverDnsAliasName);
SqlManagementTestUtilities.ValidateServerDnsAlias(serverDnsAlias, serverDnsAliasName);
ValidateServerDnsAlias(serverDnsAlias, serverDnsAliasName);

// List server dns aliases on source server and verify
//
Expand All @@ -43,7 +43,12 @@ public void TestCrudServerDnsAlias()

// Update server to which alias is pointing
//
var serverDnsAliasAcquisitonParams = new ServerDnsAliasAcquisition(String.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Sql/servers/{2}/dnsAliases/{3}", sqlClient.SubscriptionId, resourceGroup.Name, sourceServer.Name, serverDnsAliasName));
var serverDnsAliasAcquisitonParams = new ServerDnsAliasAcquisition(String.Format(
"/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Sql/servers/{2}/dnsAliases/{3}",
sqlClient.SubscriptionId,
resourceGroup.Name,
sourceServer.Name,
serverDnsAliasName));

sqlClient.ServerDnsAliases.Acquire(resourceGroup.Name, targetServer.Name, serverDnsAliasName, serverDnsAliasAcquisitonParams);

Expand All @@ -56,5 +61,12 @@ public void TestCrudServerDnsAlias()

}
}

private void ValidateServerDnsAlias(ServerDnsAlias actual, string name)
{
Assert.NotNull(actual);
Assert.NotNull(actual.Id);
Assert.Equal(name, actual.Name);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,7 @@ public static void ValidateVirtualNetworkRule(VirtualNetworkRule expected, Virtu
Assert.Equal(expected.VirtualNetworkSubnetId, actual.VirtualNetworkSubnetId);
}

public static void ValidateServerDnsAlias(ServerDnsAlias actual, string name)
{
Assert.NotNull(actual);
Assert.NotNull(actual.Id);
Assert.Equal(name, actual.Name);
}

internal static Task<Database[]> CreateDatabasesAsync(
internal static Task<Database[]> CreateDatabasesAsync(
SqlManagementClient sqlClient,
string resourceGroupName,
Server server,
Expand Down

0 comments on commit 5a5e426

Please sign in to comment.