From a26b4a9f1eaed65e801a1de0ed73b4da76d37e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 11 Jul 2020 18:29:55 +0200 Subject: [PATCH] chore: reenable ignored integration tests (#6703) --- cli/tests/045_proxy_test.ts | 18 +++++++++++++++--- cli/tests/cafile_info.ts.out | 1 - cli/tests/integration_tests.rs | 15 +++++---------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/cli/tests/045_proxy_test.ts b/cli/tests/045_proxy_test.ts index d9d63ea522..c8df8ceb2e 100644 --- a/cli/tests/045_proxy_test.ts +++ b/cli/tests/045_proxy_test.ts @@ -19,12 +19,23 @@ async function proxyRequest(req: ServerRequest): Promise { method: req.method, headers: req.headers, }); - req.respond(resp); + req.respond({ + status: resp.status, + body: new Uint8Array(await resp.arrayBuffer()), + headers: resp.headers, + }); } async function testFetch(): Promise { const c = Deno.run({ - cmd: [Deno.execPath(), "--reload", "--allow-net", "045_proxy_client.ts"], + cmd: [ + Deno.execPath(), + "run", + "--quiet", + "--reload", + "--allow-net", + "045_proxy_client.ts", + ], stdout: "piped", env: { HTTP_PROXY: `http://${addr}`, @@ -40,8 +51,9 @@ async function testModuleDownload(): Promise { const http = Deno.run({ cmd: [ Deno.execPath(), - "--reload", "cache", + "--reload", + "--quiet", "http://localhost:4545/std/examples/colors.ts", ], stdout: "piped", diff --git a/cli/tests/cafile_info.ts.out b/cli/tests/cafile_info.ts.out index c509907051..f39f381d75 100644 --- a/cli/tests/cafile_info.ts.out +++ b/cli/tests/cafile_info.ts.out @@ -1,7 +1,6 @@ local: [WILDCARD]https[WILDCARD]localhost_PORT5545[WILDCARD] type: TypeScript compiled: [WILDCARD].js -map: [WILDCARD].js.map deps: https://localhost:5545/cli/tests/cafile_info.ts ├── https://localhost:5545/cli/tests/subdir/mt_text_typescript.t1.ts diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 2ec25d0d05..f064c4db18 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1237,6 +1237,7 @@ macro_rules! itest( ); // Unfortunately #[ignore] doesn't work with itest! +#[allow(unused)] macro_rules! itest_ignore( ($name:ident {$( $key:ident: $value:expr,)*}) => { #[ignore] @@ -1346,12 +1347,6 @@ itest!(_023_no_ext_with_headers { output: "023_no_ext_with_headers.out", }); -// FIXME(bartlomieju): this test should use remote file -itest_ignore!(_024_import_no_ext_with_headers { - args: "run --reload 024_import_no_ext_with_headers.ts", - output: "024_import_no_ext_with_headers.ts.out", -}); - // TODO(lucacasonato): remove --unstable when permissions goes stable itest!(_025_hrtime { args: "run --quiet --allow-hrtime --unstable --reload 025_hrtime.ts", @@ -1515,8 +1510,8 @@ itest!(_044_bad_resource { exit_code: 1, }); -itest_ignore!(_045_proxy { - args: "run --allow-net --allow-env --allow-run --reload 045_proxy_test.ts", +itest!(_045_proxy { + args: "run --allow-net --allow-env --allow-run --allow-read --reload --quiet 045_proxy_test.ts", output: "045_proxy_test.ts.out", http_server: true, }); @@ -2103,9 +2098,9 @@ itest!(cafile_eval { http_server: true, }); -itest_ignore!(cafile_info { +itest!(cafile_info { args: - "info --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts", + "info --quiet --cert tls/RootCA.pem https://localhost:5545/cli/tests/cafile_info.ts", output: "cafile_info.ts.out", http_server: true, });