How are you sanitizing a cloud RDBMS resource for Integration Testing in your pipelines?
We are running in to a problem where the integration tests drop and recreate a database between each test, so each test is running in isolation. This runs great and quickly when running against a local testing server, but when migrating it to the cloud, the deletion and creation time of databases are non-trivial. (Add to that, that you have to pick some heavy weight sku's for some features adds to the provisioning time).
We have tried running the server in containers which is fine, but adds a layer of container management to the pipeline scripts. Some other options I have come up with but haven't tried or discarded:
- Add sleeps
- 90s seems to be long enough to get a small db built in the cloud but of course balloons the run time
- Work with dev to clean data with DML instead of DDL
- Should be much quicker to clean but will require custom code for each test I assume and will require Dev to alter their workflow
- Continue using containers
- I feel this just punts the problem to later down the pipeline though, eventually we will need a "real" environment