Re: [PATCH v4 0/6] Support triangular workflows
From: Jeff King <hidden>
Date: 2016-06-15 22:56:35
On Mon, Apr 01, 2013 at 02:21:22AM +0530, Ramkumar Ramachandra wrote:
Jeff King wrote:quoted
[...]So, you're saying: don't test compound statements for failure, since anything in the chain could fail and propagate failure. I should only test simple git-foo commands for failure?
Right.
quoted
Sometimes it's annoyingly verbose to break down a compound function. But I think in this case, you can make your tests more robust by just checking the affirmative that the ref is still where we expect it to be, like: check_push_result up_repo $the_first_commit heads/masterDoesn't that change the meaning of the test though? I really like how the original tests read.
Does it? I thought the original was: test_must_fail check_push_result up_repo $the_commit heads/master which is checking that we did _not_ push $the_commit to up_repo. Checking that without a negative means confirming that what _used_ to be there is still there, which is $the_first_commit. But I didn't actually run it, so I might be wrong about what is supposed to be there after the (lack of) push. -Peff