diff options
Diffstat (limited to 'tests/integration/run_tests.rs')
-rw-r--r-- | tests/integration/run_tests.rs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index 5e9d00a67..88ddfb318 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -977,8 +977,8 @@ fn lock_redirects() { .run() .assert_matches_text(concat!( "Download http://localhost:4545/echo.ts\n", - "Download http://localhost:4558/@denotest/esm-basic\n", - "Download http://localhost:4558/@denotest/esm-basic/1.0.0.tgz\n", + "Download http://localhost:4260/@denotest/esm-basic\n", + "Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz\n", "Hi, there", )); util::assertions::assert_wildcard_match( @@ -2830,6 +2830,9 @@ mod permissions { #[test] fn net_fetch_allow_localhost_4545() { + // ensure the http server is running for those tests so they run + // deterministically whether the http server is running or not + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( true, "run --allow-net=localhost:4545 run/complex_permissions_test.ts netFetch http://localhost:4545/", @@ -2842,6 +2845,7 @@ mod permissions { #[test] fn net_fetch_allow_deno_land() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=deno.land run/complex_permissions_test.ts netFetch http://localhost:4545/", @@ -2854,6 +2858,7 @@ mod permissions { #[test] fn net_fetch_localhost_4545_fail() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=localhost:4545 run/complex_permissions_test.ts netFetch http://localhost:4546/", @@ -2866,6 +2871,7 @@ mod permissions { #[test] fn net_fetch_localhost() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( true, "run --allow-net=localhost run/complex_permissions_test.ts netFetch http://localhost:4545/ http://localhost:4546/ http://localhost:4547/", @@ -2878,6 +2884,7 @@ mod permissions { #[test] fn net_connect_allow_localhost_ip_4555() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( true, "run --allow-net=127.0.0.1:4545 run/complex_permissions_test.ts netConnect 127.0.0.1:4545", @@ -2890,6 +2897,7 @@ mod permissions { #[test] fn net_connect_allow_deno_land() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=deno.land run/complex_permissions_test.ts netConnect 127.0.0.1:4546", @@ -2902,6 +2910,7 @@ mod permissions { #[test] fn net_connect_allow_localhost_ip_4545_fail() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=127.0.0.1:4545 run/complex_permissions_test.ts netConnect 127.0.0.1:4546", @@ -2914,6 +2923,7 @@ mod permissions { #[test] fn net_connect_allow_localhost_ip() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( true, "run --allow-net=127.0.0.1 run/complex_permissions_test.ts netConnect 127.0.0.1:4545 127.0.0.1:4546 127.0.0.1:4547", @@ -2926,9 +2936,10 @@ mod permissions { #[test] fn net_listen_allow_localhost_4555() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( true, - "run --allow-net=localhost:4558 run/complex_permissions_test.ts netListen localhost:4558", + "run --allow-net=localhost:4588 run/complex_permissions_test.ts netListen localhost:4588", None, None, false, @@ -2938,6 +2949,7 @@ mod permissions { #[test] fn net_listen_allow_deno_land() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=deno.land run/complex_permissions_test.ts netListen localhost:4545", @@ -2950,6 +2962,7 @@ mod permissions { #[test] fn net_listen_allow_localhost_4555_fail() { + let _http_guard = util::http_server(); let (_, err) = util::run_and_collect_output( false, "run --allow-net=localhost:4555 run/complex_permissions_test.ts netListen localhost:4556", @@ -2962,6 +2975,7 @@ mod permissions { #[test] fn net_listen_allow_localhost() { + let _http_guard = util::http_server(); // Port 4600 is chosen to not collide with those used by // target/debug/test_server let (_, err) = util::run_and_collect_output( |