FileNotFound in docker environment
See original GitHub issueHi,
I’ve some trouble with the de.flapdoodle.embed.mongo library in my Unit Tests. My Unit Tests are written in Java 8 using the Spring-Boot Framework in version 2.0.9.RELEASE. The embbeded mongodb is the suggested version from spring (2.0.3).
The unit tests runs on a jenkins using docker. The exception I have got is
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedMongoServer' defined in class path resource [org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.class]: Invocation of init method failed; nested exception is java.io.IOException: Cannot run program "/tmp/extract-1aabfc01-694e-475b-b260-79d3c107a6d3extractmongod": error=2, No such file or directory
Caused by: java.io.IOException: Cannot run program "/tmp/extract-1aabfc01-694e-475b-b260-79d3c107a6d3extractmongod": error=2, No such file or directory
Caused by: java.io.IOException: error=2, No such file or directory
To use the mebedded mongodb, I have annotated my class this @DataMongoTest
.
I already can say, that this file in the tmp directory is existing and it seams to be not empty. On other systems works the embedded db fine, such as on a macOS system or a debian linux server without docker. This error I’ve got seams to me as a problem using the embedded mongodb inside a docker container. I’ll run my unit tests using maven.
Do anyone have some suggestions where the error is? Thanks for help
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (9 by maintainers)
I can finally report that my unit tests running fine 😀
For documentation reasons, here are my steps I have done to achieve that.
Thank you for the great help over easter.
thanks for documenting, enjoy your holidays too 🍺