Skip to content

Latest commit

 

History

History
18 lines (9 loc) · 871 Bytes

README.md

File metadata and controls

18 lines (9 loc) · 871 Bytes

couchbase-test-docker

JUnit test example with Couchbase in a Docker container and TestContainers.

TestContainers allow you to run a container before tests, either for all the class or each methods. This example runs a container with Couchbase Server preconfigured and loaded with the beer-sample. Than test the beer-sample. To run this test successfuly you need to build the DockerFile at the root with the tag 'mycouchbase:latest'.

Building the container

docker build -t mycouchbase:latest

Running the Rest

gradle build

How it works

The GenericContainer is used with a custom wait strategy. It wait for the HTTP endpoint /pools/default to be accessible and for the node to have the healthy status.