Skip to content

Commit

Permalink
Don't send experiments to kinto if bugzilla id missing fixes #3012 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredlockhart authored Jul 28, 2020
1 parent 892f9c4 commit c2cbe58
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/experimenter/kinto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def check_kinto_push_queue():

queued_experiments = Experiment.objects.filter(
type=Experiment.TYPE_RAPID, status=Experiment.STATUS_REVIEW
)
).exclude(bugzilla_id=None)

if queued_experiments.exists():
if client.has_pending_review():
Expand Down
20 changes: 19 additions & 1 deletion app/experimenter/kinto/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,25 @@ def test_check_with_rapid_review_and_kinto_pending_pushes_nothing(self):
tasks.check_kinto_push_queue()
self.mock_push_task.assert_not_called()

def test_check_with_rapid_review_and_no_kinto_pending_pushes_experiment(self):
def test_check_with_rapid_review_and_no_bugzilla_and_no_kinto_pending_pushes_nothing(
self,
):
ExperimentFactory.create_with_status(
Experiment.STATUS_REVIEW,
bugzilla_id=None,
firefox_channel=Experiment.CHANNEL_RELEASE,
firefox_max_version=None,
firefox_min_version=Experiment.VERSION_CHOICES[0][0],
name="test",
type=Experiment.TYPE_RAPID,
)
self.setup_kinto_no_pending_review()
tasks.check_kinto_push_queue()
self.mock_push_task.assert_not_called()

def test_check_with_rapid_review_and_bugzilla_and_no_kinto_pending_pushes_experiment(
self,
):
experiment = ExperimentFactory.create_with_status(
Experiment.STATUS_REVIEW,
bugzilla_id="12345",
Expand Down

0 comments on commit c2cbe58

Please sign in to comment.