Closed Bug 1917371 Opened 1 year ago Closed 1 year ago

Consolidate unit_base_updater and unit_service_updater tests

Categories

(Toolkit :: Application Update, task, P3)

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: bytesized, Assigned: mpohle)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(1 file)

We have two sets of tests for the updater binary: unit_base_updater, which runs the update binary directly, and unit_service_updater, which runs the updater via the Mozilla Maintenance Service.

We actually have this script whose purpose, to be honest, I don't really understand. I vaguely recall being told that it was meant to prevent the directories from drift out of sync? Except that it doesn't run in any sort of automated fashion, so it really doesn't enforce that. Perhaps it is just meant to make it easy to find the small handful of differences?

All of this seems very silly to me. There is a much better way of dealing with this problem than basically having duplicates of all these tests. We can use the same solution that we use for running tests with and without BITS. We have all the tests that run one way in one test manifest and all the tests that run another way in another test manifest. And we basically just enforce the tests having different behavior by setting a pref in the manifest. Though another option would be to specify a different test head script.

I think that we should do the following:

  • Determine all the changes between the two directories. What files are only present in one or the other. Differences between the duplicated files.
  • Make a unit_update_binary test directory, that we will consolidate all tests into. Move the head.js files for both original directories here, as something like head_service.js and head_no_service.js. Move the manifests into the new directory, naming them similarly.
  • For tests that exist in just one place just move them into the new directory.
  • For tests that exist in both places, get rid of the differences by having the tests check gIsServiceTest in order to conditionally perform the correct behavior. Move the tests into the new directory.
  • Remove all the Svc filename suffixes in the test names and manifests.
  • Update the relevant config files to look for the manifests in the new locations and remove the old test directories.
  • I would also like to make sure it's not too hard to tell which way the tests are running, since the filenames will no longer make it obvious. I think we can probably do this by just adding a line to the head*.js files that outputs what kind of test it is running as.

It's likely that some of the tests that only exist in one directory currently could be tests that work both ways. We could look into that as part of this, but that's really optional.

Assignee: nobody → mpohle
Status: NEW → ASSIGNED
Attachment #9442194 - Attachment description: WIP: Bug 1917371 - Consolidate unit_base_updater and unit_service_updater tests, r=bytesized → Bug 1917371 - Consolidate unit_base_updater and unit_service_updater tests, r=bytesized
Pushed by mpohle@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d15f84756dc8 Consolidate unit_base_updater and unit_service_updater tests, r=bytesized,application-update-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: