File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
core/Azure.Core.TestFramework/src
digitaltwins/Azure.DigitalTwins.Core/tests Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ public void InitializeRecordedTestClass()
154154 Logger = new TestLogger ( ) ;
155155 }
156156
157- if ( ! _useLegacyTransport )
157+ if ( ! _useLegacyTransport && Mode != RecordedTestMode . Live )
158158 {
159159 _proxy = TestProxy . Start ( ) ;
160160 }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public abstract class E2eTestBase : RecordedTestBase<DigitalTwinsTestEnvironment
2323 protected static readonly int MaxIdLength = 27 ;
2424
2525 public E2eTestBase ( bool isAsync )
26- : base ( isAsync , TestSettings . Instance . TestMode )
26+ : base ( isAsync , TestSettings . Instance . TestMode , useLegacyTransport : true )
2727 {
2828 Sanitizer = new TestUrlSanitizer ( ) ;
2929 }
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ namespace Azure.DigitalTwins.Core.Tests
99{
1010 internal class TestUrlSanitizer : RecordedTestSanitizer
1111 {
12+ internal const string FAKE_URL = "https://fakeHost.api.wus2.digitaltwins.azure.net" ;
13+ internal const string FAKE_HOST = "fakeHost.api.wus2.digitaltwins.azure.net" ;
14+
1215 public TestUrlSanitizer ( )
1316 {
1417 UriRegexSanitizers . Add (
@@ -18,7 +21,9 @@ public TestUrlSanitizer()
1821 } ) ;
1922 }
2023
21- internal const string FAKE_URL = "https://fakeHost.api.wus2.digitaltwins.azure.net" ;
22- internal const string FAKE_HOST = "fakeHost.api.wus2.digitaltwins.azure.net" ;
24+ public override string SanitizeUri ( string uri )
25+ {
26+ return uri . Replace ( new Uri ( uri ) . Host , FAKE_HOST ) ;
27+ }
2328 }
2429}
You can’t perform that action at this time.
0 commit comments