public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Daniel Gustafsson <[email protected]>
To: PostgreSQL Developers <[email protected]>
To: Heikki Linnakangas <[email protected]>
Subject: Re: Using Test::More test functions for pg_rewind
Date: Mon, 21 Feb 2022 10:17:32 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>


On 2/21/22 09:10, Daniel Gustafsson wrote:
> check_query() in RewindTest.pm currently has this comment before handrolling
> tests for return code and stderr:
>
>   # We don't use ok() for the exit code and stderr, because we want this
>   # check to be just a single test.
>
> The code came with the initial import of pg_rewind, and there is no further
> explanation but I guess it was to make test planning easier since each
> check_query would count as 1 test.  (inspecting old pre-import pg_rewind repos
> on Github didn't given any other insights).  Does anymore remember the
> rationale for this?
>
> Since we moved to done_testing() with 549ec201d we no longer need be concerned
> with test counts, so we can replace this with normal is() tests, as per the
> attached, making the output in the errorpath consistent with other tests.
> Unless I'm missing something important here.


Looks OK. Now we require a sufficiently modern Test::More we could have
made it a subtest if necessary.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com







view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Using Test::More test functions for pg_rewind
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox