summaryrefslogtreecommitdiff
path: root/cli/http_util.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-06-18 17:54:55 +0200
committerGitHub <noreply@github.com>2020-06-18 11:54:55 -0400
commit90c5dcfe79cd010b429e775a3ebcb3c5d78fa6ff (patch)
tree461a23f50869c7cbe9bf621c60d11bd3eaaa8800 /cli/http_util.rs
parenta2969ecd27645bafc7195baa7cfecbebfd8d2bf4 (diff)
chore(test): move testing utilities to test_util crate (#6360)
Diffstat (limited to 'cli/http_util.rs')
-rw-r--r--cli/http_util.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/cli/http_util.rs b/cli/http_util.rs
index 2278afc8d..b528f411f 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 = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url =
Url::parse("http://127.0.0.1:4545/cli/tests/fixture.json").unwrap();
@@ -267,7 +267,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_gzip() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url = Url::parse(
"http://127.0.0.1:4545/cli/tests/053_import_compression/gziped",
@@ -291,7 +291,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_etag() {
- let http_server_guard = crate::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;
@@ -316,7 +316,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_brotli() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url = Url::parse(
"http://127.0.0.1:4545/cli/tests/053_import_compression/brotli",
@@ -341,7 +341,7 @@ mod tests {
#[tokio::test]
async fn test_fetch_once_with_redirect() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url =
Url::parse("http://127.0.0.1:4546/cli/tests/fixture.json").unwrap();
@@ -398,13 +398,13 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_cafile_string() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url =
Url::parse("https://localhost:5545/cli/tests/fixture.json").unwrap();
let client = create_http_client(Some(String::from(
- crate::test_util::root_path()
+ test_util::root_path()
.join("std/http/testdata/tls/RootCA.pem")
.to_str()
.unwrap(),
@@ -424,14 +424,14 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_cafile_gzip() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url = Url::parse(
"https://localhost:5545/cli/tests/053_import_compression/gziped",
)
.unwrap();
let client = create_http_client(Some(String::from(
- crate::test_util::root_path()
+ test_util::root_path()
.join("std/http/testdata/tls/RootCA.pem")
.to_str()
.unwrap(),
@@ -454,10 +454,10 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_cafile_with_etag() {
- let http_server_guard = crate::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(
- crate::test_util::root_path()
+ test_util::root_path()
.join("std/http/testdata/tls/RootCA.pem")
.to_str()
.unwrap(),
@@ -486,14 +486,14 @@ mod tests {
#[tokio::test]
async fn test_fetch_with_cafile_brotli() {
- let http_server_guard = crate::test_util::http_server();
+ let http_server_guard = test_util::http_server();
// Relies on external http server. See tools/http_server.py
let url = Url::parse(
"https://localhost:5545/cli/tests/053_import_compression/brotli",
)
.unwrap();
let client = create_http_client(Some(String::from(
- crate::test_util::root_path()
+ test_util::root_path()
.join("std/http/testdata/tls/RootCA.pem")
.to_str()
.unwrap(),