flapdoodle-oss / de.flapdoodle.embed.mongo.spring

embedded mongo spring integration
Apache License 2.0
30 stars 7 forks source link

spring uses auth for mongodb - fails at test #14

Closed michaelmosmann closed 1 year ago

michaelmosmann commented 1 year ago

@toritsejuFO:

Hi @michaelmosmann. I encountered the same issue. Seems embedded mongo is configured to require auth, and there's no way to disable auth for tests. When I leave username and password as empty, I get an error in creating the bean, and it propagates the error upwards. When I put a random username and password, it fails with

org.springframework.data.mongodb.UncategorizedMongoDbException: Command failed with error 13 (Unauthorized): 'command find requires authentication' on server localhost:60826. The full response is {"ok": 0.0, "errmsg": "command find requires authentication", "code": 13, "codeName": "Unauthorized"}

Originally posted by @toritsejuFO in https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/408#issuecomment-1427799313