summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
authorOscar Linde <lindeoscar@gmail.com>2020-07-13 01:18:27 +0200
committerGitHub <noreply@github.com>2020-07-12 19:18:27 -0400
commit3be2064803b127c1aaa4af4aa3f060bcc8e88049 (patch)
treec6a0b739903a536fc727430f8dac38c4b578fd65 /cli/tests/integration_tests.rs
parente1d814055281ee2781dfda93cf8b2637b8d65800 (diff)
feat(cli): add DENO_CERT environment variable (#6370)
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index f064c4db1..935454636 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2183,6 +2183,27 @@ itest!(deno_lint_glob {
});
#[test]
+fn cafile_env_fetch() {
+ use url::Url;
+ let g = util::http_server();
+ let deno_dir = TempDir::new().expect("tempdir fail");
+ let module_url =
+ Url::parse("https://localhost:5545/cli/tests/cafile_url_imports.ts")
+ .unwrap();
+ let cafile = util::root_path().join("cli/tests/tls/RootCA.pem");
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .env("DENO_CERT", cafile)
+ .current_dir(util::root_path())
+ .arg("cache")
+ .arg(module_url.to_string())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ drop(g);
+}
+
+#[test]
fn cafile_fetch() {
use url::Url;
let g = util::http_server();