Skip to content

[Release 1.6.0] Updating DNS powershell to new SDK #2572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Jul 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
052601e
powershell fixes
Apr 12, 2016
7b1322b
powershell fixes for new sdk
Apr 14, 2016
fe40608
adding dns1.6.0 pkg
Apr 15, 2016
8282d25
powershell to add new recordset with records
Apr 16, 2016
c2fbbc2
add help and allow empty dns records
Apr 16, 2016
85feb87
Merge remote-tracking branch 'refs/remotes/Azure/dev' into dev
Apr 16, 2016
a7c9bcd
checking in pre-swagger sdk files
May 17, 2016
5a70c30
updating powershell for swagger and fixing misc bugs
May 24, 2016
c10c68e
updating localfeed with latest dns
May 24, 2016
f1e2b70
remove logging helpers
May 24, 2016
be178e5
fixing dns version in packages.config
May 24, 2016
44d60c1
fixing help file
May 24, 2016
f8ccc93
add framework dll to packages.config
May 26, 2016
4d496c4
add framework assemly to msi
Jun 1, 2016
4841b06
Merge with Azure branch
vladrai Jun 3, 2016
d60ce5c
Removing location
vladrai Jun 3, 2016
089b756
Merge remote-tracking branch 'refs/remotes/Azure/dev' into dev
vladrai Jul 1, 2016
6e0f69d
Updating Management.Dns nuget
vladrai Jul 2, 2016
450b3d9
Fixing powershell tests to work with new DNS nuget
vladrai Jul 2, 2016
50c686a
Updating from Azure/dev
vladrai Jul 5, 2016
569e625
Fixing DNS tests
vladrai Jul 6, 2016
cfbcc4d
Merge remote-tracking branch 'refs/remotes/Azure/dev' into dev
vladrai Jul 6, 2016
dce38e8
Forcing test json to be copied to output folder
vladrai Jul 6, 2016
293cc5d
Making zone scenarios to be copied as well
vladrai Jul 6, 2016
5442a85
CR updates
vladrai Jul 6, 2016
6e9eb4f
Merge remote-tracking branch 'refs/remotes/Azure/release-1.6.0' into dev
vladrai Jul 6, 2016
f5fdc47
Updating for release branch
vladrai Jul 6, 2016
08731ab
Merge remote-tracking branch 'refs/remotes/Azure/release-1.6.0' into dev
vladrai Jul 6, 2016
3d49692
Merge conflicts from release branch
vladrai Jul 6, 2016
2274be0
CR changes
vladrai Jul 7, 2016
80efed5
Fixing test records directory
vladrai Jul 7, 2016
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
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.4-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
Expand Down Expand Up @@ -123,6 +124,7 @@
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.ResourceManager" version="1.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.6026.28191-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5945.28173-prerelease" targetFramework="net45" />
Expand Down
80 changes: 70 additions & 10 deletions src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,61 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Authorization">
<Reference Include="Microsoft.Azure.Management.Authorization, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Dns, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Dns.1.2.1-preview\lib\net40\Microsoft.Azure.Management.Dns.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Dns.1.7.2-preview\lib\net45\Microsoft.Azure.Management.Dns.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.1.1-preview\lib\net45\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Test.Framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6026.28191-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5945.28173-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.3-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.27.306291202\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.27.306291202\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.4-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.2.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
Expand Down Expand Up @@ -123,6 +148,7 @@
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -155,8 +181,6 @@
<Compile Include="ScenarioTests\ZoneTests.cs" />
<Compile Include="ScenarioTests\RecordsTests.cs" />
<Compile Include="ScenarioTests\DnsTestsBase.cs" />
<Compile Include="UnitTests\GetAzureDnsRecordSetTests.cs" />
<Compile Include="UnitTests\GetAzureDnsZoneTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication\Commands.Common.Authentication.csproj">
Expand Down Expand Up @@ -210,15 +234,24 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetAAAA.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetAAAANonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetAddRecordTypeMismatch.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetAddTwoCnames.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetANonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetCNAME.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetCNAMENonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetCrud.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -237,15 +270,27 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetGet.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetGetWithEndsWith.json">
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetMX.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetMX.json">
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetMXNonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetnewAlreadyExists.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetNS.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetNSNonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetPTR.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetPTRNonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetRemoveRecordTypeMismatch.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -255,9 +300,21 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetSRV.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetSRVNonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetTXT.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetTXTLegacyLengthValidation.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetTXTLengthValidation.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.RecordsTests\TestRecordSetTXTNonEmpty.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneCrud.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -273,7 +330,10 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneList.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneListWithEndsWith.json">
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneListSubscription.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneNewAlreadyExists.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests\TestZoneRemoveEtagMismatch.json">
Expand Down
16 changes: 16 additions & 0 deletions src/ResourceManager/Dns/Commands.Dns.Test/ScenarioTests/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,20 @@ function TestSetup-CreateResourceGroup
$rglocation = Get-ProviderLocation "microsoft.compute"
$resourceGroup = New-AzureRmResourceGroup -Name $resourceGroupName -location $rglocation
return $resourceGroup
}

function Get-RandomZoneName
{
$prefix = getAssetName;
return $prefix + ".pstest.test" ;
}

function Get-TxtOfSpecifiedLength([int] $length)
{
$returnValue = "";
for ($i = 0; $i -lt $length ; $i++)
{
$returnValue += "a";
}
return $returnValue;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System.Collections.Generic;
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Test.HttpRecorder;
using System.Collections.Generic;
using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework;

namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests
{
Expand All @@ -23,23 +24,26 @@ namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests
using Microsoft.Azure.Management.Dns;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Subscriptions;
using Microsoft.Azure.Test;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using System;
using System.IO;
using System.Linq;
using WindowsAzure.Commands.Test.Utilities.Common;
using LegacyTest = Microsoft.Azure.Test;
using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory;
using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities;

public class DnsTestsBase : RMTestBase
{
private CSMTestEnvironmentFactory csmTestFactory;
private LegacyTest.CSMTestEnvironmentFactory csmTestFactory;


private readonly EnvironmentSetupHelper helper;


public ResourceManagementClient ResourceManagementClient { get; private set; }


public SubscriptionClient SubscriptionClient { get; private set; }


Expand Down Expand Up @@ -67,13 +71,13 @@ protected DnsTestsBase()
}


protected void SetupManagementClients()
protected void SetupManagementClients(MockContext context)
{
this.ResourceManagementClient = this.GetResourceManagementClient();
this.SubscriptionClient = this.GetSubscriptionClient();
this.GalleryClient = this.GetGalleryClient();
this.AuthorizationManagementClient = this.GetAuthorizationManagementClient();
this.DnsClient = this.GetFeatureClient();
this.DnsClient = this.GetFeatureClient(context);


this.helper.SetupManagementClients(
Expand Down Expand Up @@ -104,7 +108,7 @@ public void RunPowerShellTest(params string[] scripts)

public void RunPsTestWorkflow(
Func<string[]> scriptBuilder,
Action<CSMTestEnvironmentFactory> initialize,
Action<LegacyTest.CSMTestEnvironmentFactory> initialize,
Action cleanup,
string callingClassType,
string mockName)
Expand All @@ -116,13 +120,11 @@ public void RunPsTestWorkflow(
var providersToIgnore = new Dictionary<string, string>();
providersToIgnore.Add("Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01");
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");

using (UndoContext context = UndoContext.Current)
using (MockContext context = MockContext.Start(callingClassType, mockName))
{
context.Start(callingClassType, mockName);


this.csmTestFactory = new CSMTestEnvironmentFactory();
this.csmTestFactory = new LegacyTest.CSMTestEnvironmentFactory();


if (initialize != null)
Expand All @@ -131,7 +133,7 @@ public void RunPsTestWorkflow(
}


this.SetupManagementClients();
this.SetupManagementClients(context);


this.helper.SetupEnvironment(AzureModule.AzureResourceManager);
Expand Down Expand Up @@ -171,34 +173,29 @@ public void RunPsTestWorkflow(
}
}


protected ResourceManagementClient GetResourceManagementClient()
{
return TestBase.GetServiceClient<ResourceManagementClient>(this.csmTestFactory);
return LegacyTest.TestBase.GetServiceClient<ResourceManagementClient>(this.csmTestFactory);
}


private AuthorizationManagementClient GetAuthorizationManagementClient()
{
return TestBase.GetServiceClient<AuthorizationManagementClient>(this.csmTestFactory);
return LegacyTest.TestBase.GetServiceClient<AuthorizationManagementClient>(this.csmTestFactory);
}


private SubscriptionClient GetSubscriptionClient()
{
return TestBase.GetServiceClient<SubscriptionClient>(this.csmTestFactory);
return LegacyTest.TestBase.GetServiceClient<SubscriptionClient>(this.csmTestFactory);
}


private GalleryClient GetGalleryClient()
{
return TestBase.GetServiceClient<GalleryClient>(this.csmTestFactory);
return LegacyTest.TestBase.GetServiceClient<GalleryClient>(this.csmTestFactory);
}


private DnsManagementClient GetFeatureClient()
private DnsManagementClient GetFeatureClient(MockContext context)
{
return TestBase.GetServiceClient<DnsManagementClient>(this.csmTestFactory);
return context.GetServiceClient<DnsManagementClient>(TestEnvironmentFactory.GetTestEnvironment());
}
}
}
Loading