Closed duerlib closed 9 years ago
This would certainly be possible.
You should be on the right track with a @BeforeClass static method though. You simply need to connect to the running instance of MongoDB with a Java library of your choice and start inserting some data. You can use the official Java driver on its own or something extra (like Jongo).
Ok thanks, I think I am close now. However I still like the idea of the script being included in the config. No rush though. Also thanks for an awesome plugin.
Hi,
I created a pull request https://github.com/joelittlejohn/embedmongo-maven-plugin/pull/40 to initialize data after a mongo instance is up and running.
I am having trouble finding a way to add some test data to the DB before my httptests are run. I am trying to use the @BeforeClass annotation but am unable to figure out what i need to do in that method to add something. I think it would be good if I could add a script file to the config of the plugin to be run once the DB is brought up. Any thoughts?