Closed Bug 1689502 Opened 3 years ago Closed 3 years ago

Make all Normandy test decorators three layer decorators, for consistency

Categories

(Firefox :: Normandy Client, task, P3)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: mythmon, Assigned: mythmon)

Details

Attachments

(1 file)

In Phabricator review D102981 Gijs wrote: https://phabricator.services.mozilla.com/D102981#3343699

Also, would it be worth having a follow-up to settle on a pattern for the test task decoration? Reading something like:

decorate_task(
  PreferenceExperiments.withMockExperiments([
    factories.preferenceStudyFactory({
      enrollmentId: "test-enrollment-id",
    }),
  ]),
  AddonStudies.withStudies([
    factories.addonStudyFactory({ slug: "test-study" }),
  ]),
  PreferenceRollouts.withTestMock(),
  AddonRollouts.withTestMock,

is a little bit odd (ie some things are function calls (that return functions) and others are direct function references, for no clear reason).

This bug covers changing all decorators used in Normandy tests (such as AddonRollouts.withTestMock to use the "decorator maker" pattern, in which instead of being a decorator directly, they are functions which take (possibly zero) arguments, and then return a decorator. This makes the decorators more consistent, and makes it easier to add arguments to decorators in the future should it be needed.

Assignee: nobody → mcooper
Status: NEW → ASSIGNED
Pushed by mcooper@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/38ba1cfafe7a
Make all Normandy test decorators three layer decorators, for consistency r=Gijs
Pushed by mcooper@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3510c9a66246
Make all Normandy test decorators three layer decorators, for consistency r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: