Correctly check for search backend validation in search settings form
Review Request #9824 — Created March 22, 2018 and submitted
The search settings form was assuming that the
search_backend_idfield
would be available inclean, but the value is only present if the
backend passes validation. We now check for its existence instead of
assuming that it does exist and carry on with validation accordingly.
- Ran unit tests.
- Selecting "elasticsearch" on the search settings form without it
installed no longer results in a 500. - Enabling Elasticsearch works.
- Enabling Whoosh works.
| Description | From | Last Updated |
|---|---|---|
|
I also want to see test cases for a correct backend, and info in Testing Done that you've tested all … |
|
|
|
E501 line too long (84 > 79 characters) |
|
|
|
This should be two tests: One for a backend that doesn't exist, another for the validate() check. |
|
|
|
This line is too long. |
|
|
|
Ordering is all over the place. Can you fix this? |
|
|
|
Rather than the reset() above, can you use this pattern: register try: ... finally: unregister |
|
|
|
The "plain" version of a test should always go above the other ones. This should be first. |
|
|
|
F841 local variable 'form' is assigned to but never used |
|
|
|
E251 unexpected spaces around keyword / parameter equals |
|
|
|
E251 unexpected spaces around keyword / parameter equals |
|
|
|
E251 unexpected spaces around keyword / parameter equals |
|
|
|
E251 unexpected spaces around keyword / parameter equals |
|
|
|
Ordering is still off here. |
|
- Bugs:
-
- Commit:
ddb9851e7edf4af3f9d677b49822546c1fe55ff7c956c13e78057ace5840ce8ea99ba60a6bfe72dfChecks run (2 succeeded)
flake8 passed.JSHint passed.
- Testing Done:
-
~ Ran unit tests.
~ Selecting "elasticsearch" on the search settings form without it ~ installed no longer results in a 500. ~ - Ran unit tests.
~ - Selecting "elasticsearch" on the search settings form without it
installed no longer results in a 500.
~ - Enabling Elasticsearch works.
+ - Enabling Whoosh works.
- Commit:
-
c956c13e78057ace5840ce8ea99ba60a6bfe72df306886b306b2e1029bd7120f11eea76d6d53a081
- Commit:
-
ebfc44acef0532405496f53b1bab8aa3b2235f3e89e2e2baafac2ddcd3c8395648eacc64f231f3f6