Closed Bug 1091579 Opened 10 years ago Closed 10 years ago

Refactor bugscache tests & make them check the matched bug IDs

Categories

(Tree Management :: Treeherder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Currently the tests for searching the bugscache only check to see whether greater than zero bugs were found, and not how many - or whether it they were even the correct bugs. In addition, as part of bug 1057359 I'd like to add tests for more search terms, which would be easier to do if the tests used pytest's parametrize.
Ideally at some point we'd break out the refdata.update_bugscache() calls so we don't do unnecessary busy work within each test - however it's no worse off at the moment then previously, so I'll save that for another bug.
Attachment #8514245 - Flags: review?(mdoglio)
Attachment #8514245 - Flags: review?(mdoglio) → review+
Commits pushed to master at https://github.com/mozilla/treeherder-service https://github.com/mozilla/treeherder-service/commit/c1faeda8a7b77e781dac9ebf790dedc74a30a1da Bug 1091579 - Correct & reformat comments in test_refdata.py https://github.com/mozilla/treeherder-service/commit/110c5fe619044f5f2f2ab6353d091b230691e87f Bug 1091579 - Parametrize test_get_open_recent_bug_right_term() https://github.com/mozilla/treeherder-service/commit/8b803b10f39e3c2a69472e8f333270472739eee1 Bug 1091579 - test_get_open_recent_bug_right_term() should check the bug IDs found ...rather than just whether the count of bugs is greater than zero. https://github.com/mozilla/treeherder-service/commit/6cb45262e79e68db0a3ce403f1fefa690f63d505 Bug 1091579 - Combine the tests for correct and incorrect search terms https://github.com/mozilla/treeherder-service/commit/513d3d0c557f7cc4c6b3ce1cc097dc29d8bb559d Bug 1091579 - Parametrize test_get_all_other_bugs() https://github.com/mozilla/treeherder-service/commit/33e6ca890665efd5957fae40ed987be061846b4b Bug 1091579 - test_get_all_other_bugs() should check the bug IDs ...rather than just whether the count of bugs is greater than zero. https://github.com/mozilla/treeherder-service/commit/0c8318eb51155b9fe46baae44af0b681a009d3cf Bug 1091579 - Remove the now redundant test_get_all_other_bugs_wrong_term() https://github.com/mozilla/treeherder-service/commit/d7f9350560c81c264e3d84de03d0b6005e697229 Bug 1091579 - Rename SEARCH_TERMS to BUG_SEARCHES
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: