]> git.evergreen-ils.org Git - Evergreen.git/commit
make-pgtap-tests.pl
authorJason Etheridge <jason@esilibrary.com>
Mon, 22 Jul 2013 23:03:24 +0000 (19:03 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 1 Aug 2013 15:40:22 +0000 (11:40 -0400)
commitd6ec45265c0d1b4b1b9444d3525e0e7e13b646f7
tree25b97914997f321de899d25fc290eaf2422de5fe
parent7e8eec68388a661c68970622bccc07711b80fe47
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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/make-pgtap-tests.pl [new file with mode: 0755]