Gang,
I pushed changes to the build system and tests to automate integration
testing.
It uses docker to build the necessary images and run docker containers
as a JUnit rule.
All this is done only if the DOCKER_HOST environment variable is set,
otherwise it's skipped.
On linux with docker installed it should work out of the box given you
have DOCKER_HOST and DOCKER_CERT_PATH set.
On mac you need to:
- docker-machine create someFancyNameYouChoose
- eval $(docker-machine env someFancyNameYouChoose)
On windows, see https://docs.docker.com/machine/reference/env/
With that done, when you now run e.g:
./gradlew :ext:entity-redis:test
it will build the docker images and run Redis in a container around the
EntityStore tests.
The same goes for these extensions:
- Memcached Cache
- SQL EntityStore using both MySQL and PostgreSQL
- SQL Index/Query using PostgreSQL
- Riak EntityStore
All the others extensions are tested using embedded solutions, including
MongoDB.
Docker images are built by the :internals:testsupport-internal project,
you'll find the Dockerfiles there.
Thanks to this I was able to fix a bug I introduced in the Riak ES in
recent changes.
The only thing actually broken is SQL Index/Query, see
https://issues.apache.org/jira/browse/POLYGENE-222
For now these test do not run on CI.
builds.apache.org supports docker so we should be able to do that too at
some point.
In the meantime some of us should run the *whole* test suite from time
to time.
At least now it should be damn easy to do!
Before calling this automation done I'd like to get someone to confirm
it 'works for them'.
I only tested on a mac.
Cheers
/Paul