We have both unit tests and integration tests in our test suites. We have enabled automated repository test with a
docker-compose.test.yml file. The integration test requires a database. The setup is to have a standard
sut service linking to a
database service. But we have having
database uses an image, skipping error.
Not sure if this use case is not supported by Docker Cloud? Or are we having some mistakes somewhere?
The application is a ruby on rails web application. I am posting the (simplified)
docker-compose.test.yml file as well as part of the build/test log, if they help.
sut: build: . environment: DATABASE_PASSWORD: password links: - database command: ./run_test.sh database: image: 'postgres:9.4' environment: POSTGRES_PASSWORD: password
Part of build/test logs
Starting Test Starting Test in docker-compose.test.yml... Pulling database (postgres:9.4)... 9.4: Pulling from library/postgres Digest: sha256:f51abce88b017a278ab7f68efd46a61d417f522231b271ede0f9d53903839271 Status: Downloaded newer image for postgres:9.4 database uses an image, skipping Building sut Step 1 : FROM ruby:2.3.1-alpine ---> adae74697505 (logs removed) could not connect to server: Connection refused Is the server running on host "172.17.0.3" and accepting TCP/IP connections on port 5432?