I build a maven project that contains only tests. These tests test a REST service running in a container on my machine. The tests run successfully on my machine with mvn test.
Now I want to build a container for my test project using Wercker. In other words: I want a container that tests a service running in another container. A simple build step like mvn test fails, for Wercker runs somewhere else and can't access my REST service on my machine.
Is it possible to make such a container that runs the tests only locally and not where Wercker makes the containers?
You can use "services" to run additional containers in your pipeline. For example, say you have already built a container called "rest-server:latest" that has your REST server that you want to test in it. You can start that container up and then in your pipeline it will be available as "rest-server" so you can run your tests using that address.
So in your pipeline you could do something like:
There are some more details about linking services here: http://devcenter.wercker.com/docs/services/linking-services