Skip to content

Commit 415c8c6

Browse files
Minor fixes for test proxy on Windows (#2162)
* Minor fixes for test proxy on Windows * Early out on test mode check
1 parent 99adf9f commit 415c8c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sdk/core/azure_core_test/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ impl TestContext {
127127

128128
#[cfg(not(target_arch = "wasm32"))]
129129
{
130+
if mode == TestMode::Live {
131+
return None;
132+
}
130133
let path = match find_ancestor_file(self.crate_dir, ASSETS_FILE) {
131134
Ok(path) => path,
132135
Err(_) if mode == TestMode::Record => {

sdk/core/azure_core_test/src/proxy/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ mod bootstrap {
146146

147147
if let Some(idx) = line.find(LISTENING_PATTERN) {
148148
let idx = idx + LISTENING_PATTERN.len();
149-
let url = line[idx..].parse()?;
149+
let mut url: Url = line[idx..].parse()?;
150+
url.set_host(Some("localhost"))?;
150151
tracing::event!(target: crate::SPAN_TARGET, Level::INFO, "listening on {url}");
151152

152153
return Ok(url);

0 commit comments

Comments
 (0)