Add additional testcases for the runnable jobs feature/API

NEW
Unassigned

Status

P3
normal
2 years ago
3 months ago

People

(Reporter: emorley, Unassigned)

Tracking

Details

(Reporter)

Description

2 years ago
Even after the bustage/testcase in bug 1330015, we then had bug 1330157 occur which shows there is still not enough test coverage.

We should add some more.

I think we also need to more aggressively refuse new features if they have little testing, even if they are from contributors.
rwood, could you take a look at this? This would seem to fall under the "maintain seta" umbrella. :) The method in question you need to validate is this one:

https://github.com/mozilla/treeherder/blob/master/treeherder/etl/runnable_jobs.py#L120

You can probably simulate a simple decision task response using the responses fixture (git grep for 'responses' inside the test directory). 

The test should go in the same place as the one I added previously: tests/webapp/api/test_runnable_jobs_api.py
Flags: needinfo?(rwood)

Comment 2

2 years ago
FYI I'm making a small change to that test:
https://github.com/mozilla/treeherder/pull/2081/files#diff-dfb7add6afe5260970a94e0cae7fdf61
and the code to allow to call w/o having to pass a decision_task_id:
https://github.com/mozilla/treeherder/pull/2081/files#diff-21690b89ebf4f1dde1eb5aa5a3d258a8

The test change is to avoid having to deal with that TaskCluster before we have a more complex fixture (rather than test_job).

There's also the runnable_jobs_data fixture in here:
https://github.com/mozilla/treeherder/blob/master/tests/seta/conftest.py#L16-L60

Comment 3

2 years ago
Ok, thanks guys
Assignee: nobody → rwood
Status: NEW → ASSIGNED
Flags: needinfo?(rwood)

Updated

2 years ago
Assignee: rwood → nobody
Status: ASSIGNED → NEW
(Reporter)

Updated

a year ago
Component: Treeherder → Treeherder: Job Triggering & Cancellation
(Reporter)

Updated

a year ago
Duplicate of this bug: 1285924
(Reporter)

Comment 5

a year ago
See also bug 1285924 / bug 1254325.
(Reporter)

Updated

3 months ago
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.