Skip to content

Commit 8d876a6

Browse files
committed
Set session records directory for scenario tests.
1 parent c8df584 commit 8d876a6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
16+
using System.Collections.Generic;
17+
using System.IO;
18+
using System.Linq;
19+
using System.Net.Http;
20+
using System.Net.Http.Headers;
1521
using Microsoft.Azure.Commands.Common.Authentication;
1622
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1723
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
@@ -21,18 +27,13 @@
2127
using Microsoft.Azure.Management.Authorization;
2228
using Microsoft.Azure.Management.ResourceManager;
2329
using Microsoft.Azure.Test.HttpRecorder;
30+
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
2431
using Microsoft.WindowsAzure.Commands.Common;
2532
using Microsoft.WindowsAzure.Commands.ScenarioTest;
26-
using LegacyTest = Microsoft.Azure.Test;
2733
using LegacyRMClient = Microsoft.Azure.Management.Resources;
34+
using LegacyTest = Microsoft.Azure.Test;
2835
using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory;
2936
using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities;
30-
using System;
31-
using System.Collections.Generic;
32-
using System.Linq;
33-
using System.Net.Http;
34-
using System.Net.Http.Headers;
35-
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
3637

3738

3839
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
@@ -106,6 +107,7 @@ public void RunPsTestWorkflow(
106107
providersToIgnore.Add("Microsoft.Azure.Management.ResourceManager.ResourceManagementClient", "2016-02-01");
107108
providersToIgnore.Add("Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01");
108109
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
110+
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
109111

110112
using (MockContext context = MockContext.Start(callingClassType, mockName))
111113
{

0 commit comments

Comments
 (0)