◐ Shell
clean mode source ↗

Unit Testing · docker-java/docker-java · Discussion #1868

Hi,

I read through the past issues, but could not find anything related - are there any resources on integrating this library with unit tests? I use it with a Spring web application which renders content based on results from Docker, but am unsure what an elegant way to mock these results during testing would be.

I did find the tests in https://github.com/docker-java/docker-java/tree/master/docker-java/src/test but they seem to only contain tests for the library code itself.

Thanks!

You must be logged in to vote
You must be logged in to vote

2 replies

@tacerus

Hi! Thank you, I noticed that repository before, but thought it was for providing Docker containers to run tests inside - whilst I wanted to run tests with the results from docker-java calls. It did not occur to me I could run a container to provide the Docker service itself with it - will try it out - thank you!

@tacerus

One question though - do you know if there are any existing containers shipping a Docker API with them?