summaryrefslogtreecommitdiff
path: root/tests/integration/npm_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-07 13:21:56 -0400
committerGitHub <noreply@github.com>2024-05-07 17:21:56 +0000
commit998036b3998301dc53b0dc4700b91d0a9c630702 (patch)
tree085a2c13f45434ca169c4ab2a0574c675e46f0d0 /tests/integration/npm_tests.rs
parentf3cc760f2fd40145007ced2a37a3a0b2d1b2d9f3 (diff)
chore: fix flaky net_listen_allow_localhost_4555 (#23726)
Moves the test npm registry server port from `4558` to `426x`
Diffstat (limited to 'tests/integration/npm_tests.rs')
-rw-r--r--tests/integration/npm_tests.rs62
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs
index cdad7462e..4c4868c65 100644
--- a/tests/integration/npm_tests.rs
+++ b/tests/integration/npm_tests.rs
@@ -921,7 +921,7 @@ fn node_modules_dir_cache() {
let package_global_cache_dir = deno_dir
.path()
.join("npm")
- .join("localhost_4558")
+ .join("localhost_4260")
.join("@denotest")
.join("dual-cjs-esm")
.join("1.0.0");
@@ -1507,7 +1507,7 @@ fn auto_discover_lock_file() {
.run();
output
.assert_matches_text(
-r#"Download http://localhost:4558/@denotest/bin
+r#"Download http://localhost:4260/@denotest/bin
error: Integrity check failed for package: "npm:@denotest/bin@1.0.0". Unable to verify that the package
is the same as when the lockfile was generated.
@@ -1546,7 +1546,7 @@ fn peer_deps_with_copied_folders_and_lockfile() {
let grandchild_path = deno_dir
.path()
.join("npm")
- .join("localhost_4558")
+ .join("localhost_4260")
.join("@denotest")
.join("peer-dep-test-grandchild");
assert!(grandchild_path.join("1.0.0").exists());
@@ -1660,8 +1660,8 @@ itest!(non_existent_dep {
exit_code: 1,
output_str: Some(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/non-existent-dep\n",
- "Download http://localhost:4558/@denotest/non-existent\n",
+ "Download http://localhost:4260/@denotest/non-existent-dep\n",
+ "Download http://localhost:4260/@denotest/non-existent\n",
"[UNORDERED_END]\n",
"error: npm package '@denotest/non-existent' does not exist.\n"
)),
@@ -1674,14 +1674,14 @@ itest!(non_existent_dep_version {
exit_code: 1,
output_str: Some(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/non-existent-dep-version\n",
- "Download http://localhost:4558/@denotest/esm-basic\n",
+ "Download http://localhost:4260/@denotest/non-existent-dep-version\n",
+ "Download http://localhost:4260/@denotest/esm-basic\n",
"[UNORDERED_END]\n",
// does two downloads because when failing once it max tries to
// get the latest version a second time
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/non-existent-dep-version\n",
- "Download http://localhost:4558/@denotest/esm-basic\n",
+ "Download http://localhost:4260/@denotest/non-existent-dep-version\n",
+ "Download http://localhost:4260/@denotest/esm-basic\n",
"[UNORDERED_END]\n",
"error: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n"
)),
@@ -1706,7 +1706,7 @@ fn reload_info_not_found_cache_but_exists_remote() {
version: &str,
) {
let registry_json_path =
- format!("npm/localhost_4558/{}/registry.json", package);
+ format!("npm/localhost_4260/{}/registry.json", package);
let mut registry_json: Value =
serde_json::from_str(&deno_dir.read_to_string(&registry_json_path))
.unwrap();
@@ -1743,12 +1743,12 @@ fn reload_info_not_found_cache_but_exists_remote() {
.run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/esm-basic\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
- "Download http://localhost:4558/@denotest/cjs-default-export/1.0.0.tgz\n",
- "Download http://localhost:4558/@denotest/esm-basic/1.0.0.tgz\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default/1.0.0.tgz\n",
+ "Download http://localhost:4260/@denotest/esm-basic\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export/1.0.0.tgz\n",
+ "Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default/1.0.0.tgz\n",
"[UNORDERED_END]\n",
));
@@ -1773,8 +1773,8 @@ fn reload_info_not_found_cache_but_exists_remote() {
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
"[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
@@ -1805,8 +1805,8 @@ fn reload_info_not_found_cache_but_exists_remote() {
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
"[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
@@ -1843,8 +1843,8 @@ fn reload_info_not_found_cache_but_exists_remote() {
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
"[UNORDERED_END]\n",
"[UNORDERED_START]\n",
"Initialize @denotest/cjs-default-export@1.0.0\n",
@@ -1880,9 +1880,9 @@ fn reload_info_not_found_cache_but_exists_remote() {
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/esm-basic\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/esm-basic\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
"[UNORDERED_END]\n",
"Initialize @denotest/esm-basic@1.0.0\n",
"Node esm importing node cjs\n[WILDCARD]",
@@ -1918,9 +1918,9 @@ fn reload_info_not_found_cache_but_exists_remote() {
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(concat!(
"[UNORDERED_START]\n",
- "Download http://localhost:4558/@denotest/cjs-default-export\n",
- "Download http://localhost:4558/@denotest/esm-basic\n",
- "Download http://localhost:4558/@denotest/esm-import-cjs-default\n",
+ "Download http://localhost:4260/@denotest/cjs-default-export\n",
+ "Download http://localhost:4260/@denotest/esm-basic\n",
+ "Download http://localhost:4260/@denotest/esm-import-cjs-default\n",
"[UNORDERED_END]\n",
"Node esm importing node cjs\n[WILDCARD]",
));
@@ -2100,8 +2100,8 @@ fn top_level_install_package_json_explicit_opt_in() {
temp_dir.write("main.ts", "console.log(5);");
let output = test_context.new_command().args("cache main.ts").run();
output.assert_matches_text(concat!(
- "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",
"Initialize @denotest/esm-basic@1.0.0\n",
));
@@ -3087,7 +3087,7 @@ async fn test_private_npm_registry() {
let client = reqwest::Client::new();
- let url = Url::parse("http://127.0.0.1:4559/@denotest2/basic").unwrap();
+ let url = Url::parse("http://127.0.0.1:4261/@denotest2/basic").unwrap();
let req = reqwest::Request::new(reqwest::Method::GET, url.clone());
let resp = client.execute(req).await.unwrap();