DEV: Always use a tmp directory for storing uploads in tests (PR #9554)

This avoids development-mode upload files from polluting the test environment

GitHub

The title of this pull request changed from “DEV: Use a tmp directory for storing uploads in tests” to "DEV: Always use a tmp directory for storing uploads in tests

This seems good but CI seems to be failing and I see at least one “cannot open directory” error which seems suspicious.

Now that you’ve made this (great!) change, I wonder if you should follow up by removing is_parallel_test? from discourse.rb

My thinking is now the app never needs to know. It’s only used in db.rake and that could check the ENV values directly (or have a local helper function.)

In other words, why pollute the public API with something so specific?

1 Like