Compute the Whoosh index path setting dynamically.

Review Request #10529 — Created April 12, 2019 and submitted

Information

Review Board
release-4.0.x

Reviewers

Whoosh had a default setting for its index directory that was computed
at module initialization time. In unit tests, this resulted in the local
directory being used and not the directory set up for unit test state.

The Whoosh settings are now computed dynamically in order to take that
setting into account. On top of this, we also now override the path
hard-coded in settings.py (as part of the default Haystack
configuration, which is required) to also use the temporary storage
path.

Unit tests pass on Django 1.6 and 1.11.

Verified that a search-index directory was no longer being created
in the source directory.

Summary ID
Compute the Whoosh index path setting dynamically.
Whoosh had a default setting for its index directory that was computed at module initialization time. In unit tests, this resulted in the local directory being used and not the directory set up for unit test state. The Whoosh settings are now computed dynamically in order to take that setting into account. On top of this, we also now override the path hard-coded in `settings.py` (as part of the default Haystack configuration, which is required) to also use the temporary storage path.
b101acb491887c2d5b3bf169a834c67188273473
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (6bc544f)