Tweak test_system_update_enterprisepolicy.js to be less confusing when if fails because of non-test enterprise policies have been loaded instead
Categories
(Toolkit :: Add-ons Manager, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
Details
Attachments
(1 file)
Not a bug per se, but the test case test_system_update_enterprisepolicy.js will fail if executed on a developer machine where an enterprise policy json file is found at system level, which end up silently be used instead of the enterprise policies data set by the test case itself, and then hitting an assertion failure about unexpected system addons directories found, which in practice under this corner case doesn't help to understand that the failure is hit not because of a bug or regression but because of enterprise policy already existing in the same system.
I got to hit this corner case because I was testing out something around enterprise policies and forgot to remove that test enterprise policy from my system, and after a few days I was getting failures on this test and didn't make the connection between the failure and the enterprise policy I was testing out a few days earlier until I actually investigated the failure deeply enough to determine what was going on.
Asserting explicitly that the enterprise policy returned by Services.policies.getActivePolicies should be matching the test policy set by the test itself would have been useful, maybe also mentioning in the assertion message to double-check enterprise policies installed at system level in case of failures may also be a reasonable way to help a developer hitting the failure to more quickly pinpoint what is triggering it.
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•