Closed Bug 1501879 Opened 6 years ago Closed 3 years ago

test_system_update_fail is totally broken

Categories

(Toolkit :: Add-ons Manager, defect, P2)

60 Branch
defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: aswan, Assigned: mixedpuppy)

Details

Attachments

(1 file)

The helper function execSystemAddonTest() has a "feature" where it can test that some particular action should fail:
https://searchfox.org/mozilla-central/rev/72b1e834f384a2ffec6eb4ce405fbd4b5e881109/toolkit/mozapps/extensions/test/xpcshell/head_addons.js#1691

But this code catches all exceptions.  In the case of test_system_update_fail.js, it doesn't pass enough arguments to execSystemAddonTest:
https://searchfox.org/mozilla-central/rev/72b1e834f384a2ffec6eb4ce405fbd4b5e881109/toolkit/mozapps/extensions/test/xpcshell/test_system_update_fail.js#181

so we can an exception here:
https://searchfox.org/mozilla-central/rev/72b1e834f384a2ffec6eb4ce405fbd4b5e881109/toolkit/mozapps/extensions/test/xpcshell/head_addons.js#1360

Which makes the test happy thinking that the system addon update failed when in fact we never get around to trying it.  Fixing the immediate error causes the test to fail in a different way that I don't have time to figure out at the moment.

We should both fix the test and fix execSystemAddonTest so that it checks the actual exception that is thrown to ensure that the failure it has caught is the one the test is written to expect.
Priority: -- → P2
Assignee: rhelmer → nobody
Assignee: nobody → mixedpuppy
Status: NEW → ASSIGNED
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61e307b93a59
fix system update failure tests r=robwu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: