Re: [PATCH 2/2] t5516/t5601: be less strict about the number of credential warnings
- From
Jeff King <peff@peff.net>
- Date
- Nov 1, 2022, 02:27 UTC
- Message-ID
- <Y2CEHvo0WyttNfVk@coredump.intra.peff.net>
- In-Reply-To
- <98fa5270cb720f2f038c4bb9571c7d306ff5d759.1667245639.git.gitgitgadget@gmail.com>
On Mon, Oct 31, 2022 at 07:47:18PM +0000, Johannes Schindelin via GitGitGadget wrote:
Show 27 quoted lines
> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh > index 0b386c74818..b72cdeb6243 100755 > --- a/t/t5601-clone.sh > +++ b/t/t5601-clone.sh > @@ -78,19 +78,19 @@ test_expect_success LIBCURL 'clone warns or fails when using username:password' > > test_must_fail git -c transfer.credentialsInUrl=warn clone https://username:password@224.0.0.1 attempt2 2>err && > grep "warning: $message" err >warnings && > - test_line_count = 2 warnings && > + test_line_count -ge 1 warnings && > > test_must_fail git -c transfer.credentialsInUrl=die clone https://username:password@224.0.0.1 attempt3 2>err && > grep "fatal: $message" err >warnings && > - test_line_count = 1 warnings && > + test_line_count -ge 1 warnings && > > test_must_fail git -c transfer.credentialsInUrl=die clone https://username:@224.0.0.1 attempt3 2>err && > grep "fatal: $message" err >warnings && > - test_line_count = 1 warnings > + test_line_count -ge 1 warnings > ' > > test_expect_success LIBCURL 'clone does not detect username:password when it is https://username@domain:port/' ' > - test_must_fail git -c transfer.credentialsInUrl=warn clone https://username@localhost:8080 attempt3 2>err && > + test_must_fail git -c transfer.credentialsInUrl=warn clone https://username@224.0.0.1:8080 attempt3 2>err && > ! grep "uses plaintext credentials" err > '
By the way, this last part of the hunk obviously belongs in the first patch. I adjusted as appropriate in the patch I just sent.
-Peff