git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] tests(scalar): tighten the stale `scalar.repo` test some
@ 2022-11-10  7:28 Johannes Schindelin via GitGitGadget
  2022-11-10 13:56 ` Derrick Stolee
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2022-11-10  7:28 UTC (permalink / raw)
  To: git; +Cc: Derrick Stolee, Johannes Schindelin, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

As pointed out by Stolee, the previous incarnation of this test case was
not stringent enough: we want to verify that _only_ the stale entries
are removed (previously, the test case would have succeeded even if all
entries had been removed).

Let's rectify this and verify that the other entries are left intact.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
    tests(scalar): tighten the stale scalar.repo test some
    
    A follow-up for a topic already in next.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1415%2Fdscho%2Ftighten-stale-scalar.repos-test-case-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1415/dscho/tighten-stale-scalar.repos-test-case-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1415

 t/t9210-scalar.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index c7f8a379108..25f500cf682 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -171,10 +171,13 @@ test_expect_success '`reconfigure -a` removes stale config entries' '
 	scalar register stale &&
 	scalar list >scalar.repos &&
 	grep stale scalar.repos &&
+
+	grep -v stale scalar.repos >expect &&
+
 	rm -rf stale &&
 	scalar reconfigure -a &&
 	scalar list >scalar.repos &&
-	! grep stale scalar.repos
+	test_cmp expect scalar.repos
 '
 
 test_expect_success 'scalar delete without enlistment shows a usage' '

base-commit: c90db53d203d7ade1dc7abe63857cfb5616fe34f
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests(scalar): tighten the stale `scalar.repo` test some
  2022-11-10  7:28 [PATCH] tests(scalar): tighten the stale `scalar.repo` test some Johannes Schindelin via GitGitGadget
@ 2022-11-10 13:56 ` Derrick Stolee
  2022-11-11 22:25   ` Taylor Blau
  0 siblings, 1 reply; 3+ messages in thread
From: Derrick Stolee @ 2022-11-10 13:56 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget, git; +Cc: Johannes Schindelin

On 11/10/2022 2:28 AM, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> As pointed out by Stolee, the previous incarnation of this test case was
> not stringent enough: we want to verify that _only_ the stale entries
> are removed (previously, the test case would have succeeded even if all
> entries had been removed).

Thanks for tightening the test!

LGTM.
-Stolee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests(scalar): tighten the stale `scalar.repo` test some
  2022-11-10 13:56 ` Derrick Stolee
@ 2022-11-11 22:25   ` Taylor Blau
  0 siblings, 0 replies; 3+ messages in thread
From: Taylor Blau @ 2022-11-11 22:25 UTC (permalink / raw)
  To: Derrick Stolee
  Cc: Johannes Schindelin via GitGitGadget, git, Johannes Schindelin

On Thu, Nov 10, 2022 at 08:56:41AM -0500, Derrick Stolee wrote:
> On 11/10/2022 2:28 AM, Johannes Schindelin via GitGitGadget wrote:
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > As pointed out by Stolee, the previous incarnation of this test case was
> > not stringent enough: we want to verify that _only_ the stale entries
> > are removed (previously, the test case would have succeeded even if all
> > entries had been removed).
>
> Thanks for tightening the test!

Thanks, both. I merged this back into 'js/remove-stale-scalar-repos' and
will re-merge it back into 'next' during the next push-out (probably on
Monday or Tuesday of next week).

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-11 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  7:28 [PATCH] tests(scalar): tighten the stale `scalar.repo` test some Johannes Schindelin via GitGitGadget
2022-11-10 13:56 ` Derrick Stolee
2022-11-11 22:25   ` Taylor Blau

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).