Skip to content

Commit 43bb5c9

Browse files
authored
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?
2 parents a154b10 + 883cbb2 commit 43bb5c9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/testsuite/credential_process.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ fn token_caching() {
555555
.file("src/lib.rs", "")
556556
.build();
557557

558-
let output = r#"[UPDATING] `alternative` index
558+
let output = str![[r#"
559+
[UPDATING] `alternative` index
559560
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
560561
[PACKAGING] foo v0.1.0 ([ROOT]/foo)
561562
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
@@ -565,7 +566,8 @@ fn token_caching() {
565566
[NOTE] waiting [..]
566567
You may press ctrl-c [..]
567568
[PUBLISHED] foo v0.1.0 at registry `alternative`
568-
"#;
569+
570+
"#]];
569571

570572
// The output should contain two JSON messages from the provider in both cases:
571573
// The first because the credential is expired, the second because the provider
@@ -574,7 +576,8 @@ You may press ctrl-c [..]
574576
.with_stderr_data(output)
575577
.run();
576578

577-
let output_non_independent = r#"[UPDATING] `alternative` index
579+
let output_non_independent = str![[r#"
580+
[UPDATING] `alternative` index
578581
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"read"}
579582
[PACKAGING] foo v0.1.1 ([ROOT]/foo)
580583
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
@@ -584,7 +587,8 @@ You may press ctrl-c [..]
584587
[NOTE] waiting [..]
585588
You may press ctrl-c [..]
586589
[PUBLISHED] foo v0.1.1 at registry `alternative`
587-
"#;
590+
591+
"#]];
588592

589593
p.change_file(
590594
"Cargo.toml",

0 commit comments

Comments
 (0)