[osmosis-dev] Database Unit Tests using Docker
Brett Henderson
brett at bretth.com
Wed Jan 7 11:38:38 UTC 2015
Hi All,
For a long time it has been difficult to run all of the Osmosis unit tests
due to the dependency on a database server with both pgsnapshot and apidb
schemas configured. Installing these schemas isn't super complicated, but
it requires quite a few manual steps and a good understanding of PostgreSQL.
To simplify this process I've created some Docker scripts that will allow
you to get a PostgreSQL instance running the latest version of both schemas
from the Osmosis source tree.
There is a new directory called db-server in the Osmosis source tree. It
has a fairly minimal readme.txt that lists the two commands you need to
run. Once it's up and running you should be able to run the full suite of
unit tests. A full "./gradlew clean build" takes just over a minute on my
desktop PC.
Note that docker should be available on most modern Linux distributions (on
Fedora, "yum install docker" followed by "service start docker", followed
by adding your user to the docker group should be sufficient). On OSX, the
boot2docker tool available via homebrew provides a good solution. On
Windows you'll probably need a Linux VM.
I'd love to hear any feedback.
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20150107/cecec359/attachment.html>
More information about the osmosis-dev
mailing list