Eric Huss
6fa758e83c
Fix flaky not_found_permutations test.
2023-04-14 08:01:34 -07:00
Eric Huss
c00a633bd6
Don't display headers in spurious warning message.
...
The headers can significantly contribute to noise in the output,
drowning out the rest of the output. Most investigation will likely be
focused on the case where cargo completely fails to download, so this
only shows the full detail in the final error message.
2023-04-12 09:38:53 -07:00
Eric Huss
4702fa3ad3
Include the IP address in HTTP errors.
2023-04-12 09:38:53 -07:00
Eric Huss
c7c9b8f32b
Show some HTTP headers in error messages.
2023-04-12 09:38:52 -07:00
Eric Huss
a9e0b505d6
Update auth error message to specify args for cargo login
.
2023-04-10 10:20:21 -07:00
Eric Huss
1ee340c0a7
Don't query permutations of the path prefix.
2023-04-04 18:49:42 -07:00
Eric Huss
6bd1209a55
Add delays to network retries.
2023-03-31 14:04:48 -07:00
Arlo Siemsen
78d4f2cb84
Make sparse the default protocol for crates.io
2023-03-02 10:50:22 -06:00
Scott Schafer
98c746629b
chore: update registry
tests to use check
2023-02-20 12:22:24 -06:00
Eric Huss
5c160dde1c
Handle .cargo-ok being truncated
2023-01-31 15:03:28 -08:00
Arlo Siemsen
7dc5506756
Stabilize sparse-registry
2023-01-05 11:04:52 -06:00
Jacob Finkelman
f20ab0fa9b
move login tests
2022-12-14 20:40:59 +00:00
Jacob Finkelman
29ff25f6d9
cleanups round 1
2022-12-13 23:49:07 +00:00
Jacob Finkelman
c2a1daab63
print the public key on login
2022-12-13 19:09:57 +00:00
Jacob Finkelman
40325c4d4a
generate and check secret_key
2022-12-12 17:52:49 +00:00
Jacob Finkelman
b907a7f7ea
Add test for wrighting keys
2022-12-12 17:51:47 +00:00
bors
0460192d1a
Auto merge of #11337 - weihanglo:compression-ratio, r=ehuss
...
Aware of compression ratio for unpack size limit
2022-11-29 19:10:00 +00:00
Arlo Siemsen
9827412fee
Implement RFC 3139: alternative registry authentication support
2022-11-16 14:36:19 -06:00
Weihang Lo
de7cd31eac
aware of compression ratio for unpack size limit
2022-11-04 18:40:44 +00:00
Anton Lazarev
d70a4ee93c
update stderr in tests for unrelated functionality
2022-10-28 17:13:25 -07:00
Eric Huss
5e6da66c03
Add test for deleted index entry
2022-10-22 18:20:52 -07:00
bors
5788d76d68
Auto merge of #11209 - arlosi:sparse-kind, r=ehuss
...
Add new SourceKind::SparseRegistry to differentiate sparse registries
Refactor sparse registry to have its own `SourceKind`.
Follow up from https://github.com/rust-lang/cargo/pull/11177#issuecomment-1272395571
r? `@ehuss`
2022-10-12 21:03:19 +00:00
Arlo Siemsen
d77aef5ba4
Add configuration option for controlling crates.io protocol
...
`registries.crates-io.protocol` can be set to either `sparse` or `git`.
The default is `git` unless `-Z sparse-registry` is passed.
2022-10-11 14:44:09 -05:00
Arlo Siemsen
56f68168f3
Add new SourceKind::SparseRegistry to differentiate sparse registries
2022-10-11 09:26:59 -05:00
Arlo Siemsen
dd5134c7a5
Implement RFC 3289: source replacement ambiguity
2022-10-07 22:30:59 -05:00
Arlo Siemsen
dcc512b317
Add retry support to sparse registries
2022-10-07 12:00:24 -05:00
Scott Schafer
ab18bd40d5
refactor(testsuite): Replace [project]
with [package]
2022-09-26 09:51:16 -06:00
Weihang Lo
22ac249db2
Run reach_max_unpack_size
test only on debug build
2022-09-15 19:02:26 +01:00
Weihang Lo
d87d57dbbd
CVE-2022-36114: add tests
2022-09-14 10:54:49 +02:00
Weihang Lo
dafe4a7ea0
CVE-2022-36113: add tests
2022-09-14 10:54:47 +02:00
Scott Schafer
c239e407e7
add a reason to masquerade_as_nightly_cargo
so it is searchable
2022-07-15 21:32:23 -05:00
Eric Huss
502a9c5407
Fix tests due to change in dead_code diagnostic.
2022-06-23 13:08:08 -07:00
Jacob Finkelman
288856b778
HTTP-based -> sparse
...
Co-authored-by: Arlo Siemsen <arkixml@gmail.com>
2022-06-17 16:45:33 +00:00
Kornel
a9faf49040
Use specific terminology for sparse HTTP-based registry
...
Git-based registry uses HTTP too
2022-06-17 15:09:56 +01:00
Arlo Siemsen
24dac452c5
Improve testing framework for http registries
...
Improve integration of the http server introduced by the http-registry feature.
Now the same HTTP server is used for serving downloads, the index, and
the API.
This makes it easier to write tests that deal with authentication and
http registries.
2022-06-10 16:51:35 -05:00
Arlo Siemsen
2622074d43
Require http-registry URLs to end with a '/'
2022-05-23 21:39:23 -05:00
Martin Pool
0c525bbb0e
Test CACHEDIR.TAG is created in an existing registry
2022-04-24 19:51:01 -07:00
Martin Pool
7e366c2ef2
Test creation of .cargo/registry/CACHEDIR.TAG
2022-04-24 19:51:01 -07:00
Arlo Siemsen
412b633914
HTTP registry implementation
2022-03-20 18:02:09 -07:00
Jacob Finkelman
88f3bb9a67
add a test for login on stdin
2022-03-04 23:05:48 +00:00
Weihang Lo
0afd40b4de
Update tests to display dep-req info for dep-chain
2021-08-24 00:39:38 +08:00
Weihang Lo
8c75e2ffa0
Update tests to use registry names
2021-07-22 00:50:30 +08:00
gilescope
e94199cb06
Only put it on a new line if there's candidates to compare against.
2021-07-14 08:27:52 +01:00
gilescope
dc0e53b7c1
Reworking message to not care about an intial offset
2021-07-10 15:07:29 +01:00
David Tolnay
396bdd3a89
Remove parsing of broken version syntax from 5 years ago
2021-05-26 14:37:39 -07:00
Eric Huss
1dae5acb7d
Move paths
to cargo-util.
2021-03-20 17:42:41 -07:00
Eric Huss
196673bb1e
Add a schema version to the index.
2021-02-10 10:58:07 -08:00
Steven Joruk
05a8127c10
Skip extracting .cargo-ok files from packages
...
This fixes the case where a package contained an empty .cargo-ok file
and was mounted in a read only file system. This lead to attempting to
download the package again, which failed due to write permissions.
2020-11-07 17:01:21 +00:00
Eric Huss
6f8c7d5a87
Normalize raw string indentation.
2020-09-26 17:59:58 -07:00
Alex Crichton
6514c289d2
Improve git error messages a bit
...
This commit is targeted at further improving the error messages
generated from git errors. For authentication errors the actual URL
fetched is now printed out as well if it's different from the original
URL. This should help handle `insteadOf` logic where SSH urls are used
instead of HTTPS urls and users can know to track that down.
Otherwise the logic about recommending `net.git-fetch-with-cli` was
tweaked a bit and moved to the same location as the rest of our error
reporting.
Note that a change piggy-backed here as well is that `Caused by:` errors
are now automatically all tabbed over a bit instead of only having the
first line tabbed over. This required a good number of tests to be
updated, but it's just an updated in renderings.
2020-06-25 08:47:15 -07:00