Refactor bugscache tests & make them check the matched bug IDs

RESOLVED FIXED

Status

P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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.
(Assignee)

Comment 1

4 years ago
Created attachment 8514245 [details] [review]
Refactor bugscache tests & make them check the matched bug IDs

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+

Comment 2

4 years ago
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
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.