Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/AzSdk.reference.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.props'))" />
<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.16, 4.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.14, 3.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.18, 4.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.17, 3.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<PackageReference Include="System.Net.Http" Version="4.3.0"/>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
Expand Down
6 changes: 3 additions & 3 deletions src/AzSdk.test.reference.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('test.props'))" />

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.12.0, 2.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="[1.7.4, 2.0.0)" />
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.13.1, 2.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="[1.7.5, 2.0.0)" />
<PackageReference Include="Microsoft.Azure.ResourceManager" Version="[1.1.0-preview]" />

<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
<PropertyGroup>
<Description>Provides management capabilities for Azure Analysis Services accounts.</Description>
<AssemblyTitle>Microsoft Azure Analysis Services Management Library</AssemblyTitle>
<Version>2.0.3</Version>
<Version>2.0.4</Version>
<AssemblyName>Microsoft.Azure.Management.Analysis</AssemblyName>
<PackageId>Microsoft.Azure.Management.Analysis</PackageId>
<PackageTags>AnalysisService;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
This is a public release of the Azure AnalysisServices SDK. Included with this release is adding query scale out and firewall support which are released in 2017-08-01 API.
]]>
</PackageReleaseNotes>
<PackageReleaseNotes>Taking dependency on 10.0.3 version of Newtonsoft nuget package.</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyDescription("Provides management functionality for Azure Analysis Services Resources.")]

[assembly: AssemblyVersion("2.0.3.0")]
[assembly: AssemblyFileVersion("2.0.3.0")]
[assembly: AssemblyFileVersion("2.0.4.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<Description>Provides ApiManagement management capabilities for Microsoft Azure.</Description>
<AssemblyTitle>Microsoft Azure API Management Management</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Management.ApiManagement</AssemblyName>
<Version>4.0.4-preview</Version>
<Version>4.0.5-preview</Version>
<PackageTags>Microsoft Azure ApiManagement management;API Management;</PackageTags>
<PackageReleaseNotes>Refer https://aka.ms/apimdotnetsdkchangelog for release notes.</PackageReleaseNotes>
<PackageReleaseNotes>Taking dependency on 10.0.3 version of Newtonsoft nuget package.</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyDescription("Provides Api management capabilities for Microsoft Azure.")]

[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.4.0")]
[assembly: AssemblyFileVersion("4.0.5.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Azure .NET SDK")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

<PropertyGroup>
<Description>Microsoft Azure Application Insights Library</Description>
<Version>0.1.1-preview</Version>
<Version>0.2.0-preview</Version>
<AssemblyName>Microsoft.Azure.Management.ApplicationInsights</AssemblyName>
<PackageId>Microsoft.Azure.Management.ApplicationInsights</PackageId>
<PackageTags>Management.ApplicationInsights;</PackageTags>
<PackageReleaseNotes>This is a preview release of the Application Insights Management SDK. Included with this release is support for components/webtests/continuous export configuration/pricing tier managment APIs.</PackageReleaseNotes>
<PackageReleaseNotes>Taking dependency on 10.0.3 version of Newtonsoft nuget package.</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[assembly: AssemblyTitle("Microsoft Azure Management Application Insights Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Management Application Insights operations.")]

[assembly: AssemblyVersion("0.1.0.1")]
[assembly: AssemblyFileVersion("0.1.0.1")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Network" Version="[14.0.0-preview,16.0)" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="System.Threading" Version="4.3.0" />
<ProjectReference Include="..\Management.Automation\Microsoft.Azure.Management.Automation.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ public void CanCreateUpdateDeleteAutomationModules()

Assert.NotNull(module);
Assert.Equal(ModuleProvisioningState.Creating, module.ProvisioningState);
EnsureModuleReachesSuccessProvisioningState(moduleName, testFixture, out module);
module = EnsureModuleReachesSuccessProvisioningState(moduleName, testFixture);
Assert.Equal(moduleName, module.Name);
Assert.Equal("1.0", module.Version);

// Update the module
module = testFixture.CreateAutomationModule(moduleName, contentLink2);
Assert.NotNull(module);
Assert.Equal(ModuleProvisioningState.Creating, module.ProvisioningState);
EnsureModuleReachesSuccessProvisioningState(moduleName, testFixture, out module);
module = EnsureModuleReachesSuccessProvisioningState(moduleName, testFixture);
Assert.Equal(moduleName, module.Name);
Assert.Equal("2.0", module.Version);

Expand All @@ -373,6 +373,54 @@ public void CanCreateUpdateDeleteAutomationModules()
}
}

[Fact]
public void CanCreateUpdateDeletePython2Packages()
{
using (var context = MockContext.Start(GetType().FullName))
{
using (var testFixture = new AutomationTestBase(context))
{

var python2PackageName = "numpy";
// Content links don't have to be valid for playback. However, these are the actual module download locations used for recording.
var contentLink1 = "https://bhbrahmaprodtestingseau.blob.core.windows.net/module1/numpy-1.14.5-cp27-none-win_amd64.whl";
var contentLink2 = "https://bhbrahmaprodtestingseau.blob.core.windows.net/module2/numpy-1.15.2-cp27-none-win_amd64.whl";

testFixture.DeletePython2Package(python2PackageName, true);

var python2Package = testFixture.CreateAutomationPython2Package(python2PackageName, contentLink1);

Assert.NotNull(python2Package);
Assert.Equal(ModuleProvisioningState.Creating, python2Package.ProvisioningState);
python2Package = EnsurePython2PackageReachesSuccessProvisioningState(python2PackageName, testFixture);
Assert.Equal(python2PackageName, python2Package.Name);
Assert.Equal("1.14.5", python2Package.Version);

// Update the module
python2Package = testFixture.CreateAutomationPython2Package(python2PackageName, contentLink2);
Assert.NotNull(python2Package);
Assert.Equal(ModuleProvisioningState.Creating, python2Package.ProvisioningState);
python2Package = EnsurePython2PackageReachesSuccessProvisioningState(python2PackageName, testFixture);
Assert.Equal(python2PackageName, python2Package.Name);
Assert.Equal("1.15.2", python2Package.Version);

// Delete the module
bool deleteCompleted = false;
testFixture.DeletePython2Package(python2PackageName);
try
{
testFixture.GetAutomationPython2Package(python2PackageName);
}
catch (ErrorResponseException)
{
// Exception expected
deleteCompleted = true;
}
Assert.True(deleteCompleted);
}
}
}

[Fact]
public void CanCreateUpdateDeleteSourceControl()
{
Expand Down Expand Up @@ -479,23 +527,40 @@ public void CanCreateSourceControlSyncJob()
}
}

private void EnsureModuleReachesSuccessProvisioningState(string moduleName, AutomationTestBase testFixture, out Module module)
private Module EnsureModuleReachesSuccessProvisioningState(string moduleName, AutomationTestBase testFixture)
{
// Wait for the module Provisioing state to reach Succeeded
GetModuleAction getmoduleAction = () => testFixture.GetAutomationModule(moduleName);
return TestProvisioningStateSucceeded(getmoduleAction);
}

private Module EnsurePython2PackageReachesSuccessProvisioningState(string moduleName, AutomationTestBase testFixture)
{
GetModuleAction getPython2PackageAction = () => testFixture.GetAutomationPython2Package(moduleName);
return TestProvisioningStateSucceeded(getPython2PackageAction);
}

private delegate Module GetModuleAction();

private Module TestProvisioningStateSucceeded (GetModuleAction action)
{
var startTime = DateTime.Now;
var endTime = startTime.AddMinutes(5);
bool provisioningSucceeded = false;
bool success = false;
Module module;
do
{
Thread.Sleep(50); // Used 5 seconds polling delay in the record mode, using 50 ms in playback for test to complete fast
module = testFixture.GetAutomationModule(moduleName);
module = action();
if (module.ProvisioningState == ModuleProvisioningState.Succeeded)
{
provisioningSucceeded = true;
success = true;
break;
}

} while (DateTime.Now < endTime);
Assert.True(provisioningSucceeded);
Assert.True(success);
return module;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class BaseTest
protected const string AutomationAccountName = "fbs-aa-01";
protected const string updateConfigurationName_01 = "test-suc-001";
protected const string updateConfigurationName_02 = "test-suc-002";
protected const string VM_01 = "/subscriptions/05fd3142-4b8e-4b16-8da9-98b4bbfd722d/resourceGroups/compute-01/providers/Microsoft.Compute/virtualMachines/vm-arm-01";
protected const string VM_02 = "/subscriptions/05fd3142-4b8e-4b16-8da9-98b4bbfd722d/resourceGroups/to-delete/providers/Microsoft.Compute/virtualMachines/mo-arm-02";
protected const string VM_01 = "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0/providers/Microsoft.Compute/virtualMachines/vmj-arm-01";
protected const string VM_02 = "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0/providers/Microsoft.Compute/virtualMachines/vmj-arm-02";

protected AutomationClient automationClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SoftwareUpdateConfigurationMachineRunTests : BaseTest
[Fact]
public void CanGetMachineRunById()
{
var runId = Guid.Parse("b56021cf-1643-4bfb-99d3-6b798db242f5");
var runId = Guid.Parse("da6493d0-de31-48d9-bc78-08e3c1d80d0a");
using (var context = MockContext.Start(GetType().FullName))
{
this.CreateAutomationClient(context);
Expand All @@ -32,14 +32,14 @@ public void CanGetAllMachineRuns()

var runs = this.automationClient.SoftwareUpdateConfigurationMachineRuns.List(ResourceGroupName, AutomationAccountName);
Assert.NotNull(runs.Value);
Assert.Equal(27, runs.Value.Count);
Assert.Equal(16, runs.Value.Count);
}
}

[Fact]
public void CanGetAllRunsByCorrelationId()
{
Guid correlationId = Guid.Parse("595159c7-64cb-436f-892d-b44b31970f7a");
Guid correlationId = Guid.Parse("6ff49ee2-092a-48bf-841a-c3d645611689");
using (var context = MockContext.Start(GetType().FullName))
{
this.CreateAutomationClient(context);
Expand All @@ -53,14 +53,14 @@ public void CanGetAllRunsByCorrelationId()
[Fact]
public void CanGetAllRunsByStatus()
{
const string status = "Failed";
const string status = "Succeeded";
using (var context = MockContext.Start(GetType().FullName))
{
this.CreateAutomationClient(context);

var runs = this.automationClient.SoftwareUpdateConfigurationMachineRuns.ListByStatus(ResourceGroupName, AutomationAccountName, status);
Assert.NotNull(runs.Value);
Assert.Equal(4, runs.Value.Count);
Assert.Equal(16, runs.Value.Count);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SoftwareUpdateConfigurationRunTests : BaseTest
[Fact]
public void CanGetRunById()
{
var runId = Guid.Parse("595159c7-64cb-436f-892d-b44b31970f7a");
var runId = Guid.Parse("6ff49ee2-092a-48bf-841a-c3d645611689");
using (var context = MockContext.Start(GetType().FullName))
{
this.CreateAutomationClient(context);
Expand All @@ -32,7 +32,7 @@ public void CanGetAllRuns()

var runs = this.automationClient.SoftwareUpdateConfigurationRuns.List(ResourceGroupName, AutomationAccountName);
Assert.NotNull(runs.Value);
Assert.Equal(15, runs.Value.Count);
Assert.Equal(7, runs.Value.Count);
}
}

Expand All @@ -46,7 +46,7 @@ public void CanGetAllRunsByConfigurationName()

var runs = this.automationClient.SoftwareUpdateConfigurationRuns.ListByConfigurationName(ResourceGroupName, AutomationAccountName, configName);
Assert.NotNull(runs.Value);
Assert.Equal(6, runs.Value.Count);
Assert.Equal(2, runs.Value.Count);
}
}

Expand All @@ -60,7 +60,7 @@ public void CanGetAllRunsByOs()

var runs = this.automationClient.SoftwareUpdateConfigurationRuns.ListByOsType(ResourceGroupName, AutomationAccountName, os);
Assert.NotNull(runs.Value);
Assert.Equal(17, runs.Value.Count);
Assert.Equal(7, runs.Value.Count);
}
}

Expand All @@ -74,21 +74,21 @@ public void CanGetAllRunsByStatus()

var runs = this.automationClient.SoftwareUpdateConfigurationRuns.ListByStatus(ResourceGroupName, AutomationAccountName, status);
Assert.NotNull(runs.Value);
Assert.Equal(2, runs.Value.Count);
Assert.Equal(0, runs.Value.Count);
}
}

[Fact]
public void CanGetAllRunsByStartTime()
{
var startTime = DateTime.Parse("2017-12-03T22:01:00-8").ToUniversalTime();
var startTime = DateTime.Parse("2018-10-23T11:02:00-8").ToUniversalTime();
using (var context = MockContext.Start(GetType().FullName))
{
this.CreateAutomationClient(context);

var runs = this.automationClient.SoftwareUpdateConfigurationRuns.ListByStartTime(ResourceGroupName, AutomationAccountName, startTime);
Assert.NotNull(runs.Value);
Assert.Equal(3, runs.Value.Count);
Assert.Equal(1, runs.Value.Count);
}
}
}
Expand Down
Loading