Closed Bug 1092258 Opened 10 years ago Closed 7 years ago

test_bugzilla.py shouldn't have a hardcoded count of the bugs in sample_data/bug_list.json

Categories

(Tree Management :: Treeherder: Data Ingestion, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

Details

...otherwise it has to be updated every time a new example bug is added to bug_list.json, which is non-obvious, even the tests that use it are in several directories, so may not get run locally. https://github.com/mozilla/treeherder-service/blob/master/tests/etl/test_bugzilla.py#L41
No longer blocks: 1072681
Component: Treeherder → Treeherder: Data Ingestion
Priority: P3 → P5
Mentor: emorley
If it won't be hardcoded, will there have to be a count variable which increments everytime an example is added?
Flags: needinfo?(emorley)
Hmm looking into this more I don't think it's worth trying to fix this. The way to get the count would be to check how many bugs are present in the json file loaded here: https://github.com/mozilla/treeherder/blob/74b9b003b7b3bb85449a0dee31abaa0159670a4f/tests/conftest.py#L528-L536 If the current mocking were say using responses, this would be simpler with less duplication, but as-is it's probably not worth it.
Mentor: emorley
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(emorley)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.