Re: [PATCH 2/2] t3404: add a test for the --gpg-sign option

2 messages, 2 authors, 2016-07-02 · open the first message on its own page

Re: [PATCH 2/2] t3404: add a test for the --gpg-sign option

From: Junio C Hamano <hidden>
Date: 2016-07-01 16:08:23

Johannes Schindelin [off-list ref] writes:
quoted
that has a substring '-S"' in it to ensure that the codepath to
parse --gpg-sign= on the command line of "rebase", and to the
message we see here are working correctly, without actually checking
if GPG is invoked at all, or if it is invoked the key given by the
option is correctly passed to the invocation?
Exactly. I want to test --gpg-sign even when there is no gpg executable
available.
The other side of that coine is that even when GPG is available, we
do not see if it is invoked correctly at all.  That was what I found
disturbing.

Re: [PATCH 2/2] t3404: add a test for the --gpg-sign option

From: Johannes Schindelin <hidden>
Date: 2016-07-02 07:39:11

Hi Junio,

On Fri, 1 Jul 2016, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
that has a substring '-S"' in it to ensure that the codepath to
parse --gpg-sign= on the command line of "rebase", and to the
message we see here are working correctly, without actually checking
if GPG is invoked at all, or if it is invoked the key given by the
option is correctly passed to the invocation?
Exactly. I want to test --gpg-sign even when there is no gpg executable
available.
The other side of that coine is that even when GPG is available, we
do not see if it is invoked correctly at all.  That was what I found
disturbing.
Okay, I see now.

However, is it not better to have even a limited test than none at all?
Granted, we still would not know whether rebased commits would be signed
properly. But if my trivial test case fails, we would still have a strong
indicator that something is broken, with a very convenient way to debug
it. And that is what a regression test suite is all about, isn't it?

Of course I agree that it would be very nice to have a test at a later
stage that does exercise GPG if it is available. But would it really be so
terrible to have a (simpler, not as complete) test that is exercised
*also* when GPG is *not* available?

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help