Closed Bug 858118 Opened 11 years ago Closed 11 years ago

[system] fix and reenable unit tests for update manager

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: julienw)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Assignee: nobody → felash
Attached patch patch v1 (obsolete) — Splinter Review
see also https://github.com/mozilla-b2g/gaia/pull/9016

- fix updatable tests and use the new mocks helper
- reenable update tests without any more change as I couldn't make them fail. Feel
free to disable again if this intermittently fails after all.
- fix lockscreen test for various firefox versions
---
 apps/system/test/unit/lockscreen_test.js     |   31 +++++++++-------
 apps/system/test/unit/mocks_helper.js        |   13 ++++++-
 apps/system/test/unit/setup.js               |    5 +++
 apps/system/test/unit/updatable_test.js      |   50 ++++++++++++++------------
 apps/system/test/unit/update_manager_test.js |    8 -----
 5 files changed, 63 insertions(+), 44 deletions(-)
 create mode 100644 apps/system/test/unit/setup.js
Attachment #733901 - Flags: review?(etienne)
Comment on attachment 733901 [details] [diff] [review]
patch v1

Review of attachment 733901 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the nit (singular)

let's give travis some work :)

::: apps/system/test/unit/updatable_test.js
@@ +64,5 @@
>      mockApp = new MockApp();
>      subject = new AppUpdatable(mockApp);
> +
> +    // keeping this line here, we might need to use it again in the future
> +    //subject._mgmt = MockAppsMgmt;

we have a pretty solid test-running env right now, it works well against it so let's remove the dead code/dead comment.

::: apps/system/test/unit/update_manager_test.js
@@ +36,5 @@
>    if (! window[mockName]) {
>      window[mockName] = null;
>    }
>  });
>  

(note that from my tests these tests are indeed deterministicly green now)
Attachment #733901 - Flags: review?(etienne) → review+
master: 3f9979fe26842d90c01e040f57edb9ff59580766
Attached patch patch v2Splinter Review
carrying r=etienne
Attachment #733901 - Attachment is obsolete: true
Attachment #734600 - Flags: review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: