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_id
field
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 … |
chipx86 | |
E501 line too long (84 > 79 characters) |
reviewbot | |
This should be two tests: One for a backend that doesn't exist, another for the validate() check. |
chipx86 | |
This line is too long. |
chipx86 | |
Ordering is all over the place. Can you fix this? |
chipx86 | |
Rather than the reset() above, can you use this pattern: register try: ... finally: unregister |
chipx86 | |
The "plain" version of a test should always go above the other ones. This should be first. |
chipx86 | |
F841 local variable 'form' is assigned to but never used |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Ordering is still off here. |
chipx86 |
- 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