Skip to content

Commit 88c550e

Browse files
committed
Merge branch 'dev' of github.com:naveedaz/azure-powershell into navy
2 parents 74dafb4 + 4751c00 commit 88c550e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1914
-651
lines changed

src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@
4040
<Prefer32Bit>false</Prefer32Bit>
4141
</PropertyGroup>
4242
<ItemGroup>
43-
<Reference Include="Hyak.Common">
44-
<HintPath>..\..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
43+
<Reference Include="Hyak.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<SpecificVersion>False</SpecificVersion>
45+
<HintPath>..\..\..\packages\Hyak.Common.1.0.3\lib\net45\Hyak.Common.dll</HintPath>
46+
<Private>True</Private>
4547
</Reference>
4648
<Reference Include="Microsoft.Azure.Common">
4749
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
4850
</Reference>
4951
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
52+
<SpecificVersion>False</SpecificVersion>
5053
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.3.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
5154
<Private>True</Private>
5255
</Reference>
@@ -60,14 +63,16 @@
6063
<Reference Include="Microsoft.Azure.Management.Authorization">
6164
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6265
</Reference>
63-
<Reference Include="Microsoft.Azure.Management.WebSites">
64-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.WebSites.0.16.4-prerelease\lib\net40\Microsoft.Azure.Management.WebSites.dll</HintPath>
66+
<Reference Include="Microsoft.Azure.Management.WebSites, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67+
<SpecificVersion>False</SpecificVersion>
68+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.WebSites.0.16.7-preview\lib\net45\Microsoft.Azure.Management.WebSites.dll</HintPath>
69+
<Private>True</Private>
6570
</Reference>
6671
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6772
<SpecificVersion>False</SpecificVersion>
6873
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
6974
</Reference>
70-
<Reference Include="Microsoft.Azure.Test.Framework">
75+
<Reference Include="Microsoft.Azure.Test.Framework, Version=1.0.5715.36130, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7176
<SpecificVersion>False</SpecificVersion>
7277
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5715.36130-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
7378
</Reference>
@@ -83,13 +88,23 @@
8388
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8489
</Reference>
8590
<Reference Include="Microsoft.Rest.ClientRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
86-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.2.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
91+
<SpecificVersion>False</SpecificVersion>
92+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.3.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
93+
<Private>True</Private>
94+
</Reference>
95+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
96+
<SpecificVersion>False</SpecificVersion>
97+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.1.0.20\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
8798
<Private>True</Private>
8899
</Reference>
89100
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
90101
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
91102
<Private>True</Private>
92103
</Reference>
104+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework">
105+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.0.9.1-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
106+
<Private>True</Private>
107+
</Reference>
93108
<Reference Include="Moq">
94109
<HintPath>..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll</HintPath>
95110
</Reference>
@@ -112,6 +127,7 @@
112127
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
113128
</Reference>
114129
<Reference Include="System.Net.Http.WebRequest" />
130+
<Reference Include="System.Runtime.Serialization" />
115131
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
116132
<HintPath>..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
117133
<Private>True</Private>
@@ -129,6 +145,7 @@
129145
<Compile Include="Properties\AssemblyInfo.cs" />
130146
</ItemGroup>
131147
<ItemGroup>
148+
<None Include="app.config" />
132149
<None Include="MSSharedLibKey.snk" />
133150
<None Include="packages.config">
134151
<SubType>Designer</SubType>

src/ResourceManager/Websites/Commands.Websites.Test/NewAzureWebsitesCommandTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
using System.Collections;
1616
using System.Collections.Generic;
1717
using System.Management.Automation;
18-
using Microsoft.Azure.Commands.WebApp.Utilities;
18+
using Microsoft.Azure.Commands.WebApps.Utilities;
1919
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2020
using Microsoft.WindowsAzure.Commands.Common;
21-
using Microsoft.Azure.Commands.WebApp.Cmdlets;
21+
using Microsoft.Azure.Commands.WebApps.Cmdlets;
2222
using Microsoft.Azure.Commands.WebApp;
23-
using Microsoft.Azure.Commands.WebApp.Models;
23+
using Microsoft.Azure.Commands.WebApps.Models;
2424
using Moq;
2525
using Xunit;
2626

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Test-CreatesNewSimpleWebApp
2323
$wname = Get-WebsiteName
2424
$location = Get-Location
2525
$whpName = Get-WebHostPlanName
26-
$apiversion = "2014-04-01"
26+
$apiversion = "2015-08-01"
2727
$resourceType = "Microsoft.Web/sites"
2828
$slotName = $wname + "(Dev)"
2929
try

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,24 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Common.Authentication;
1615
using Microsoft.Azure.Management.Authorization;
1716
using Microsoft.Azure.Gallery;
1817
using Microsoft.Azure.Management.Resources;
1918
using Microsoft.Azure.Management.WebSites;
2019
using Microsoft.Azure.Subscriptions;
2120
using Microsoft.Azure.Test.HttpRecorder;
2221
using Microsoft.WindowsAzure.Commands.ScenarioTest;
23-
using Microsoft.Azure.Test;
2422
using System;
2523
using System.Collections.Generic;
2624
using System.Linq;
25+
using Microsoft.Azure.Common.Authentication;
26+
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
27+
using LegacyTest = Microsoft.Azure.Test;
2728

2829
namespace Microsoft.Azure.Commands.WebApp.Test.ScenarioTests
2930
{
3031
public class WebsitesController
3132
{
32-
33-
private CSMTestEnvironmentFactory csmTestFactory;
3433
private EnvironmentSetupHelper helper;
3534
private const string TenantIdKey = "TenantId";
3635
private const string DomainKey = "Domain";
@@ -69,7 +68,7 @@ public void RunPsTest(params string[] scripts)
6968
RunPsTestWorkflow(
7069
() => scripts,
7170
// no custom initializer
72-
null,
71+
// null,
7372
// no custom cleanup
7473
null,
7574
callingClassType,
@@ -79,7 +78,6 @@ public void RunPsTest(params string[] scripts)
7978

8079
public void RunPsTestWorkflow(
8180
Func<string[]> scriptBuilder,
82-
Action<CSMTestEnvironmentFactory> initialize,
8381
Action cleanup,
8482
string callingClassType,
8583
string mockName)
@@ -88,19 +86,9 @@ public void RunPsTestWorkflow(
8886
d.Add("Microsoft.Authorization", "2014-07-01-preview");
8987
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d);
9088

91-
using (UndoContext context = UndoContext.Current)
89+
using (MockContext context = MockContext.Start(callingClassType, mockName))
9290
{
93-
context.Start(callingClassType, mockName);
94-
95-
this.csmTestFactory = new CSMTestEnvironmentFactory();
96-
97-
if (initialize != null)
98-
{
99-
initialize(this.csmTestFactory);
100-
}
101-
10291
SetupManagementClients();
103-
10492
helper.SetupEnvironment(AzureModule.AzureResourceManager);
10593

10694
var callingClassName = callingClassType
@@ -154,26 +142,26 @@ private void SetupManagementClients()
154142

155143
private AuthorizationManagementClient GetAuthorizationManagementClient()
156144
{
157-
return TestBase.GetServiceClient<AuthorizationManagementClient>(this.csmTestFactory);
145+
return LegacyTest.TestBase.GetServiceClient<AuthorizationManagementClient>();
158146
}
159147

160148
private ResourceManagementClient GetResourceManagementClient()
161149
{
162-
return TestBase.GetServiceClient<ResourceManagementClient>(this.csmTestFactory);
150+
return LegacyTest.TestBase.GetServiceClient<ResourceManagementClient>();
163151
}
164152

165153
private WebSiteManagementClient GetWebsitesManagementClient()
166154
{
167-
return TestBase.GetServiceClient<WebSiteManagementClient>(this.csmTestFactory);
155+
return TestBase.GetServiceClient<WebSiteManagementClient>(TestEnvironmentFactory.GetTestEnvironment());
168156
}
169157
private SubscriptionClient GetSubscriptionClient()
170158
{
171-
return TestBase.GetServiceClient<SubscriptionClient>(this.csmTestFactory);
159+
return LegacyTest.TestBase.GetServiceClient<SubscriptionClient>();
172160
}
173161

174162
private GalleryClient GetGalleryClient()
175163
{
176-
return TestBase.GetServiceClient<GalleryClient>(this.csmTestFactory);
164+
return LegacyTest.TestBase.GetServiceClient<GalleryClient>();
177165
}
178166

179167
}

src/ResourceManager/Websites/Commands.Websites.Test/packages.config

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
3+
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Authentication" version="1.3.3-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.WebSites" version="0.16.4-prerelease" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.WebSites" version="0.16.7-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Test.Framework" version="1.0.5715.36130-prerelease" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5715.36130-prerelease" targetFramework="net45" />
1313
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
1414
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1515
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1616
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1717
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
18-
<package id="Microsoft.Rest.ClientRuntime" version="1.2.0" targetFramework="net45" />
18+
<package id="Microsoft.Rest.ClientRuntime" version="1.3.0" targetFramework="net45" />
19+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="1.0.20" targetFramework="net45" />
1920
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.9.3" targetFramework="net45" />
21+
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="0.9.1-preview" targetFramework="net45" />
2022
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2123
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2224
<package id="xunit" version="1.9.2" targetFramework="net45" />

0 commit comments

Comments
 (0)