From 883cbb22e5bf3c80c8ebcfa1ed73b1ebd8e978ba Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 5 Sep 2025 09:24:38 -0500 Subject: [PATCH] test(credential): Switch more expected results to snapshots Had to deal with manually updating these when changing notes --- tests/testsuite/credential_process.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/testsuite/credential_process.rs b/tests/testsuite/credential_process.rs index b3823a18f..1c66a25c3 100644 --- a/tests/testsuite/credential_process.rs +++ b/tests/testsuite/credential_process.rs @@ -555,7 +555,8 @@ fn token_caching() { .file("src/lib.rs", "") .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"} [PACKAGING] foo v0.1.0 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -565,7 +566,8 @@ fn token_caching() { [NOTE] waiting [..] You may press ctrl-c [..] [PUBLISHED] foo v0.1.0 at registry `alternative` -"#; + +"#]]; // 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 @@ -574,7 +576,8 @@ You may press ctrl-c [..] .with_stderr_data(output) .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"} [PACKAGING] foo v0.1.1 ([ROOT]/foo) [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed) @@ -584,7 +587,8 @@ You may press ctrl-c [..] [NOTE] waiting [..] You may press ctrl-c [..] [PUBLISHED] foo v0.1.1 at registry `alternative` -"#; + +"#]]; p.change_file( "Cargo.toml",