mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
test(credential): Switch more expected results to snapshots (#15929)
### What does this PR try to resolve? Had to deal with manually updating these when changing notes. This will avoid that. ### How to test and review this PR?
This commit is contained in:
commit
43bb5c958b
@ -555,7 +555,8 @@ fn token_caching() {
|
|||||||
.file("src/lib.rs", "")
|
.file("src/lib.rs", "")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let output = r#"[UPDATING] `alternative` index
|
let output = str![[r#"
|
||||||
|
[UPDATING] `alternative` index
|
||||||
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
|
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
|
||||||
[PACKAGING] foo v0.1.0 ([ROOT]/foo)
|
[PACKAGING] foo v0.1.0 ([ROOT]/foo)
|
||||||
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
|
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
|
||||||
@ -565,7 +566,8 @@ fn token_caching() {
|
|||||||
[NOTE] waiting [..]
|
[NOTE] waiting [..]
|
||||||
You may press ctrl-c [..]
|
You may press ctrl-c [..]
|
||||||
[PUBLISHED] foo v0.1.0 at registry `alternative`
|
[PUBLISHED] foo v0.1.0 at registry `alternative`
|
||||||
"#;
|
|
||||||
|
"#]];
|
||||||
|
|
||||||
// The output should contain two JSON messages from the provider in both cases:
|
// The output should contain two JSON messages from the provider in both cases:
|
||||||
// The first because the credential is expired, the second because the provider
|
// The first because the credential is expired, the second because the provider
|
||||||
@ -574,7 +576,8 @@ You may press ctrl-c [..]
|
|||||||
.with_stderr_data(output)
|
.with_stderr_data(output)
|
||||||
.run();
|
.run();
|
||||||
|
|
||||||
let output_non_independent = r#"[UPDATING] `alternative` index
|
let output_non_independent = str![[r#"
|
||||||
|
[UPDATING] `alternative` index
|
||||||
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
|
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
|
||||||
[PACKAGING] foo v0.1.1 ([ROOT]/foo)
|
[PACKAGING] foo v0.1.1 ([ROOT]/foo)
|
||||||
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
|
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
|
||||||
@ -584,7 +587,8 @@ You may press ctrl-c [..]
|
|||||||
[NOTE] waiting [..]
|
[NOTE] waiting [..]
|
||||||
You may press ctrl-c [..]
|
You may press ctrl-c [..]
|
||||||
[PUBLISHED] foo v0.1.1 at registry `alternative`
|
[PUBLISHED] foo v0.1.1 at registry `alternative`
|
||||||
"#;
|
|
||||||
|
"#]];
|
||||||
|
|
||||||
p.change_file(
|
p.change_file(
|
||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user