31 Commits

Author SHA1 Message Date
Ed Page
320c279f43 Port cargo from toml-rs to toml_edit
Benefits:
- A TOML 1.0 compliant parser
- Unblock future work
  - Have `cargo init` add the current crate to the workspace, rather
    than error
  - #5586: Upstream `cargo-add`
2022-01-13 09:27:27 -06:00
l00556901
64c69dffc5 fix some bugs 2021-12-01 11:21:06 +08:00
l00556901
56b8ae7c44 delete --host command and message 2021-12-01 10:29:46 +08:00
Eric Huss
340656e29d Add RegistryBuilder to help initializing test registries.
The intent here is to make it more flexible to create different registry
setups, and to reuse code a little more easily.
2021-02-02 15:48:48 -08:00
Eric Huss
6f8c7d5a87 Normalize raw string indentation. 2020-09-26 17:59:58 -07:00
Eric Huss
4ae79d2ffd Use fs helpers instead of File functions. 2020-04-17 07:56:16 -07:00
Matthias Krüger
1d912002e9 fix most remaining clippy findings (mostly redundant imports) 2020-02-21 12:15:16 +01:00
Takayuki Nakata
4b70f14903 Load credentials only when needed
Credentials are always loaded, even if these are not used. If
access to confidential files such as credentials is not given,
`cargo build` fails despite not using credentials.

Fixes #7624.
2020-01-07 23:40:58 +09:00
Takayuki Nakata
b7bc069fbb Refactoring of creating registry 2019-12-17 14:12:27 +09:00
Takayuki Nakata
2a4d1dc40a Append registries to config 2019-12-17 09:59:45 +09:00
Takayuki Nakata
75d06de80c Remove unneeded flags 2019-12-17 08:33:48 +09:00
Takayuki Nakata
a718ed61d6 Refactoring 2019-12-14 23:16:45 +09:00
Takayuki Nakata
6cbde6e2bf Fix overwriting alternate registry token
When executing `cargo login`, 2nd alternate registry token overwrites
1st alternate registry token.

Fixes #7701.
2019-12-13 22:42:49 +09:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Alex Crichton
ebd10526f3 Run rustfmt 2019-09-16 12:00:12 -07:00
Alex Crichton
9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Zach Lute
25e3fee3c5 Allow using 'credentials.toml' instead of just 'credentials' files.
This matches a similar change to config[.toml].

Note that this change only makes 'credentials.toml' optional to use instead of 'credentials'. If both exist, we will print a warning and prefer 'credentials', since that would be the existing behavior if both existed.
2019-08-28 23:29:31 -07:00
Jethro Beekman
0e0d968825 Update #[test] attribute on all tests in the testsuite
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]')

Manual fixes:
* proc_macro::proc_macro_doctest
2019-06-07 12:41:26 -07:00
Eric Huss
b5144c7f83 Add test for publish with [patch] + cleanup. 2019-01-11 19:14:58 -08:00
Eric Huss
70f84bf3b0 Rewrite login and registry cleanups. 2018-12-20 04:34:35 -08:00
Alex Crichton
fecb724643 Format with cargo fmt 2018-12-08 03:19:47 -08:00
Dale Wijnand
04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Dale Wijnand
570fe8927d
Remove hamcrest existing_file() 2018-08-29 10:26:12 +02:00
Dale Wijnand
85984a8700
Migrate from tests fom assert_that/execs to .run() 2018-08-28 15:08:12 +02:00
Matthias Krüger
8798bf0d28 fix a bunch of clippy warnings (invocation: cargo clippy --all-targets --all-features -- --cap-lints warn )
Special thanks to dwijnand for helping me with this! :)
2018-08-12 10:00:12 +02:00
Dale Wijnand
16aeb0cd4f
Default test support's Execs to exit code 0 2018-08-03 07:44:42 +01:00
Dale Wijnand
8940d30668
Make cargo_process take a string it splits on whitespace 2018-08-02 18:00:02 +01:00
Dale Wijnand
6ca32be8a2
Declare one-line write_all contents on one line, too 2018-07-25 10:00:45 +01:00
Dale Wijnand
43b42d6f4c
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
  module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
2018-07-22 08:46:44 +01:00
Alex Crichton
1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
André Rocha
c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00