Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: How to do automated tests of a database centric CPAN module

by erix (Parson)
on Oct 21, 2012 at 19:35 UTC ( #1000237=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to do automated tests of a database centric CPAN module
in thread How to do automated tests of a database centric CPAN module

That's true but in that it's not different from Test::postgresql, as far as I can see.

From Test::postgresql docs:

new [...] If required programs (initdb and postmaster) were not found, the function returns undef and sets appropriate message to $Test::postgresql::errstr.

I think it's really only DBD::SQLite that will give you a complete package, from scratch.

( Probably one could create a package with all the bits to run a PostgreSQL instance from the binaries from the EnterpriseDB site [1], but that looks like quite an undertaking...:

(cannot run as root) http://www.enterprisedb.com/products-services-training/pgbindownload "Binaries from installer version 9.2.1" -- to use, unzip the pgsql directory somewhere, and cd into it: cd pgsql -- run initdb: ./bin/initdb -D 9.2/data -- start postgres: ./bin/pg_ctl/ -D 9.2/data -l logfile start -- run tests... -- to stop, close all connections, then: ./bin/pg_ctl -D 9.2/data -l logfile stop -- cleanup all files Hm, I don't know - possible but error-prone, probably...
)

[1] http://www.enterprisedb.com/products-services-training/pgbindownload

Replies are listed 'Best First'.
Re^6: How to do automated tests of a database centric CPAN module
by jds17 (Pilgrim) on Oct 21, 2012 at 19:48 UTC
    erix, thank you for pointing this out, I did not yet look at Test::postgresql (being busy handling SQLite support, until today I did not know just how different SQLite is from other DBMSs, in particular when trying to get meta data...). So I cannot use Test::postgresql for the stated purposes either.
Re^6: How to do automated tests of a database centric CPAN module
by jds17 (Pilgrim) on Oct 21, 2012 at 22:30 UTC

    I don't think it would be feasible to run such a PostgreSQL install during my module install, I will stick to SQLite for the time being, thank you for elaborating on this.

    erix, please allow me a well-intentioned reminder: please mark updates to your messages as such, otherwise the thread may get confusing. Better still, post them as a new message (there are always exceptions, e.g. when a definite answer is found, I like to add an update to the root node containing the original question so the answer can be found with ease).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000237]
help
Chatterbox?
[LanX]: with different specialized employees in different rooms
[LanX]: communication overhead calls for sensible management
[ambrus]: "different specialized employees in different rooms" => so, there's a cleaner guy who cleans up the vomit from the bathroom every morning?
[erix]: makes me think of MMM too (mythical man month): "adding more people to a project makes it slower"
[erix]: that should be "to an already-too-late- project" I think
[ambrus]: oh yes, we have a pretty good example of that when they reorganized the grill place in the restaurant nearby.
[ambrus]: it now has two more people working there, and they're serving slower and more expensive.
[ambrus]: It used to be just a master cook who takes the order and puts the meat and eggs on the open grill plate table, and an assistant who removes them to a plate, adds the side dish, and gives the plate to the people in the queue, plus a cashier.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-09-22 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (264 votes). Check out past polls.

    Notices?