Re: tests for client programs

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tests for client programs
Date: 2014-01-15 19:56:18
Message-ID: 51d6ff4a3d535418caaa8fd939a3bd58.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
080_pg_isready.pl.diff text/x-patch 447 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-01-15 20:01:56 Re: Why conf.d should be default, and auto.conf and recovery.conf should be in it
Previous Message Andres Freund 2014-01-15 19:53:25 Re: Add %z support to elog/ereport?