Skip to content

Make test suite deterministic when storage is involved

What does this MR do?

This MR fixes our RSpec test harness because one test example could affect subsequent examples if objects created with let had associated files stored in tmp/tests.

We store files using CarrierWave, but we also have some custom storage rules for CI builds. Some time ago we introduced MR that purged CarrierWave uploads after each run of entire test suite https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3435, but this is not enough, as we should isolate each test example to be able to rely on deterministic test suite.

Not cleaning uploads between each test example run, makes it impossible to know if preconditions are correct before test example starts to run, therefore it makes test examples, that use storage, unreliable. This MR is an attempt to improve that.

What are the relevant issue numbers?

Closes #24808 (closed)

Merge request reports