Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RavenDB stable data for integration tests

At work we are currently trying to improve our crappy integration tests, which mostly fail due to incorrect data or not up-to-date indexes. We currently have a simple .ravendbdump which is used to clean restore our integration database. It's a pain to restore the ravendbdump in some database, run data-migrations, get all the indexes up-to-date and export it all again every time we need to change the data.

I'm thinking about setting up a stable, production-like environment to include into our release pipeline to copy from every time we run an integration test, so we don't have to worry about running data-migrations and updating indexes. Currently I can't find a way to clone a database / export one db and restore it to another through RavenDB .NET client.

I'm wondering how others, using RavenDB, have solved this issue and how we can achieve stable test database for our integration test and having to update the data manually as little as possible.

like image 682
Arnoud Avatar asked Jul 30 '20 14:07

Arnoud


1 Answers

I'm pretty sure you could just copy the physical ravendb data folder to clone the db. Shut the server down for a bit, copy it over, then turn it back on. Then launch a server on the new machine with the

like image 87
damccull Avatar answered Sep 27 '22 22:09

damccull