summaryrefslogtreecommitdiff
path: root/cli/http_util.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-08-10 17:31:05 -0400
committerGitHub <noreply@github.com>2020-08-10 17:31:05 -0400
commit7d01fcbb77169d446d58a5d8c1aa113a925092a0 (patch)
treefef5b3ab1e0d020b982a2692878039423ea6fcd3 /cli/http_util.rs
parent52c1017a74059655f9424f7ceb3f0c74dcc7f3be (diff)
Remove unnecessary drop calls (#7007)
Diffstat (limited to 'cli/http_util.rs')
-rw-r--r--cli/http_util.rs29
1 files changed, 9 insertions, 20 deletions
diff --git a/cli/http_util.rs b/cli/http_util.rs
index f0109ca36..531339b5d 100644
--- a/cli/http_util.rs
+++ b/cli/http_util.rs
@@ -248,7 +248,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_string() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url =
Url::parse("http://127.0.0.1:4545/cli/tests/fixture.json").unwrap();
@@ -262,12 +262,11 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_gzip() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url = Url::parse(
"http://127.0.0.1:4545/cli/tests/053_import_compression/gziped",
@@ -286,12 +285,11 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_with_etag() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
let url = Url::parse("http://127.0.0.1:4545/etag_script.ts").unwrap();
let client = create_http_client(None).unwrap();
let result = fetch_once(client.clone(), &url, None).await;
@@ -310,13 +308,11 @@ mod tests {
let res =
fetch_once(client, &url, Some("33a64df551425fcc55e".to_string())).await;
assert_eq!(res.unwrap(), FetchOnceResult::NotModified);
-
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_brotli() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url = Url::parse(
"http://127.0.0.1:4545/cli/tests/053_import_compression/brotli",
@@ -336,12 +332,11 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_once_with_redirect() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url =
Url::parse("http://127.0.0.1:4546/cli/tests/fixture.json").unwrap();
@@ -355,7 +350,6 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[test]
@@ -398,7 +392,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_cafile_string() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url =
Url::parse("https://localhost:5545/cli/tests/fixture.json").unwrap();
@@ -419,12 +413,11 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_with_cafile_gzip() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url = Url::parse(
"https://localhost:5545/cli/tests/053_import_compression/gziped",
@@ -449,12 +442,11 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_with_cafile_with_etag() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
let url = Url::parse("https://localhost:5545/etag_script.ts").unwrap();
let client = create_http_client(Some(String::from(
test_util::root_path()
@@ -480,13 +472,11 @@ mod tests {
let res =
fetch_once(client, &url, Some("33a64df551425fcc55e".to_string())).await;
assert_eq!(res.unwrap(), FetchOnceResult::NotModified);
-
- drop(http_server_guard);
}
#[tokio::test]
async fn test_fetch_with_cafile_brotli() {
- let http_server_guard = test_util::http_server();
+ let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url = Url::parse(
"https://localhost:5545/cli/tests/053_import_compression/brotli",
@@ -512,6 +502,5 @@ mod tests {
} else {
panic!();
}
- drop(http_server_guard);
}
}