make-pgtap-tests.pl collab/phasefx/pgtap_generator_squashed
authorJason Etheridge <jason@esilibrary.com>
Mon, 22 Jul 2013 23:03:24 +0000 (19:03 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 26 Jul 2013 19:50:04 +0000 (15:50 -0400)
commit664ed43cf3c21bf0f07d7d8400c7522fc118b8d2
tree0c8b988588e1237dc3f2314d0861458fdca50db0
parent0033c26e92acb7e6577d490e4b7be357c21c6d14
make-pgtap-tests.pl

For seeding a baseline set of pgTAP tests for Evergreen.  By default, assumes
PostgreSQL is running on localhost at port 5432 with a database name of
"evergreen", and with an "evergreen" user configured with password "evergreen".

Command-line options for tweaking these are

    -db_name=? -db_host=? -db_port=? -db_user=? -db_pw=?

Make sure to install pgTAP (probably best do it from source for all the
assertion functions we're using) for the database you want to run the tests
against.

I did the following for my test environment:

    git clone git://github.com/theory/pgtap.git
    cd pgtap
    make
    make installcheck
    sudo make install

Then in my Evergreen database with psql, I did:

    CREATE EXTENSION pgtap;

I also installed a CPAN module to get pg_prove:

    sudo cpan TAP::Parser::SourceHandler::pgTAP

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/make-pgtap-tests.pl [new file with mode: 0755]