From e688a701e20cbed8908b4fb3629a554dc75b4e5b Mon Sep 17 00:00:00 2001 From: tokiedokie Date: Mon, 14 Sep 2020 20:18:00 +0900 Subject: [PATCH] test(cli/tests/https_import): use ts file in localhost instead of remote (#7431) --- cli/tests/https_import.ts | 4 +--- cli/tests/integration_tests.rs | 3 ++- cli/tests/lock_write_fetch.ts | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/tests/https_import.ts b/cli/tests/https_import.ts index faaf2175f1..e78a342a0b 100644 --- a/cli/tests/https_import.ts +++ b/cli/tests/https_import.ts @@ -1,5 +1,3 @@ -// TODO Use https://localhost:4555/ but we need more infrastructure to -// support verifying self-signed certificates. -import { printHello } from "https://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts"; +import { printHello } from "https://localhost:5545/cli/tests/subdir/print_hello.ts"; printHello(); diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 1b16c57696..bbbfd72581 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2033,8 +2033,9 @@ itest!(exit_error42 { }); itest!(https_import { - args: "run --quiet --reload https_import.ts", + args: "run --quiet --reload --cert tls/RootCA.pem https_import.ts", output: "https_import.ts.out", + http_server: true, }); itest!(if_main { diff --git a/cli/tests/lock_write_fetch.ts b/cli/tests/lock_write_fetch.ts index 5a4dea0ce9..fe05848fa9 100644 --- a/cli/tests/lock_write_fetch.ts +++ b/cli/tests/lock_write_fetch.ts @@ -11,6 +11,7 @@ const fetchProc = Deno.run({ "--reload", "--lock=lock_write_fetch.json", "--lock-write", + "--cert=tls/RootCA.pem", "https_import.ts", ], }); @@ -25,6 +26,7 @@ const fetchCheckProc = Deno.run({ Deno.execPath(), "cache", "--lock=lock_write_fetch.json", + "--cert=tls/RootCA.pem", "https_import.ts", ], });