From: Lars Schneider <larsxschneider@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] t5541: fix url scrubbing test when GPG is not set
Date: Thu, 21 Jul 2016 08:44:40 +0200 [thread overview]
Message-ID: <CF132DC4-39D8-42EB-97AC-975E4018E39C@gmail.com> (raw)
In-Reply-To: <20160720113226.GA18700@sigill.intra.peff.net>
On 20 Jul 2016, at 13:32, Jeff King <peff@peff.net> wrote:
> On Wed, Jul 20, 2016 at 10:20:33AM +0200, Lars Schneider wrote:
>
>>> * jk/push-scrub-url (2016-07-14) 1 commit
>>> (merged to 'next' on 2016-07-19 at 6ada3f1)
>>> + push: anonymize URL in status output
>>
>> t5541-http-push-smart.sh "push status output scrubs password" fails on
>> next using Travis CI OS X:
>> https://travis-ci.org/git/git/jobs/145960712
>> https://api.travis-ci.org/jobs/145960712/log.txt?deansi=true (non JS)
>>
>> I think the test either fails because of OS X or because of the
>> used Apache version (Travis CI Linux uses 2.2.22 and OS X uses 2.2.26).
>> I haven't done any further investigation.
>
> It's the lack of GPG. Here's a patch.
The tests pass with this patch!
Thanks,
Lars
>
> -- >8 --
> Subject: t5541: fix url scrubbing test when GPG is not set
>
> When the GPG prereq is not set, we do not run test 34. That
> test changes the directory of the test script as a side
> effect (something we usually frown on, but which matches the
> style of the rest of this script). When test 35 (the
> url-scrubbing test) runs, it expects to be in the directory
> from test 34. If it's not, the test fails; we are in a
> different sub-repo, our test-commit is built on a different
> history, and the push becomes a non-fast-forward.
>
> We can fix this by unconditionally moving to the directory
> we expect (again, against our usual style but matching how
> the rest of the script operates).
>
> As an additional protection, let's also switch from "make a
> new commit and push to master" to just "push to a new
> branch". We don't care about the branch name; we just want
> _some_ ref update to trigger the status output. Pushing to a
> new branch is less likely to run into problems with
> force-updates, changing the checked-out branch, etc.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t5541-http-push-smart.sh | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
> index 8068bd2..4840c71 100755
> --- a/t/t5541-http-push-smart.sh
> +++ b/t/t5541-http-push-smart.sh
> @@ -369,8 +369,10 @@ test_expect_success GPG 'push with post-receive to inspect certificate' '
> '
>
> test_expect_success 'push status output scrubs password' '
> - test_commit scrub &&
> - git push --porcelain "$HTTPD_URL_USER_PASS/smart/test_repo.git" >status &&
> + cd "$ROOT_PATH/test_repo_clone" &&
> + git push --porcelain \
> + "$HTTPD_URL_USER_PASS/smart/test_repo.git" \
> + +HEAD:scrub >status &&
> # should have been scrubbed down to vanilla URL
> grep "^To $HTTPD_URL/smart/test_repo.git" status
> '
> --
> 2.9.2.505.g2705bb6
>
next prev parent reply other threads:[~2016-07-21 6:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 22:54 What's cooking in git.git (Jul 2016, #06; Tue, 19) Junio C Hamano
2016-07-20 8:20 ` Lars Schneider
2016-07-20 11:32 ` [PATCH] t5541: fix url scrubbing test when GPG is not set Jeff King
2016-07-21 6:44 ` Lars Schneider [this message]
2016-07-20 15:58 ` What's cooking in git.git (Jul 2016, #06; Tue, 19) Pranit Bauva
2016-07-22 15:52 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CF132DC4-39D8-42EB-97AC-975E4018E39C@gmail.com \
--to=larsxschneider@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).