Re: tests for client programs - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: tests for client programs
Date
Msg-id 51d6ff4a3d535418caaa8fd939a3bd58.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to tests for client programs  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: tests for client programs  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Wed, January 15, 2014 06:30, Peter Eisentraut wrote:
> As we all know, the client programs (src/bin/) don't have any real test
>
> So I wrote something.
>
> I chose to use Perl-based tools, prove and Test::More, because those are

> [ 0001-Add-TAP-tests-for-client-programs.patch ]   32 k

I gave this a quick try.

Centos 6.5 final / perl 5.18.2


As mentioned earlier I had to install IPC::Run.

2 tests stumbled:

1. One test  ( pg_ctl/t/001_start_stop.pl )  failed because I had PGDATA set.  I unset all PG+ vars after that.  No a
big
problem but nonetheless it might be better if the test suite removes /controls the variables before running.

2. The pg_isready test failed command_fails()  ('fails with no server running') because it defaults to the compiled-in
server-port (and that server was running).  I added the test-designated port (65432, as defined in TestLib.pm).  This
simple change is in the attached patch.


With these two changes the whole test suite passed.


Thanks,

Erik Rijkers





Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add %z support to elog/ereport?
Next
From: Josh Berkus
Date:
Subject: Re: Why conf.d should be default, and auto.conf and recovery.conf should be in it