If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

ftu is causing tbpl unit test failures

RESOLVED FIXED

Status

Firefox OS
Gaia::First Time Experience
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bkelly, Assigned: bkelly)

Tracking

unspecified
x86_64
Linux

Firefox Tracking Flags

(b2g-v1.2 affected)

Details

(Whiteboard: [c= p=1 s= u=])

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
As seen here:

  https://tbpl.mozilla.org/php/getParsedLog.php?id=29265066&tree=B2g-Inbound

The FTU unit tests are failing with errors like:

  communications/ftu/test/unit/navigation_test.js | navigation > "before all" hook | Mock MockIccHelper has not been loaded into the test

It appears this was caused by ftu/test/unit/mock_icc_helper.js being removed by bug 905173.  The solution is for navigation.js to use the new shared mock_icc_helper.js.
(Assignee)

Comment 1

4 years ago
Created attachment 818633 [details]
Pull request at https://github.com/mozilla-b2g/gaia/pull/12926

This patch fixes the problem.

Note, this does not currently show on travis because the tests are run in batch mode there.
Attachment #818633 - Flags: review?(fernando.campo)
(Assignee)

Updated

4 years ago
Attachment #818633 - Attachment mime type: text/plain → text/html
Comment on attachment 818633 [details]
Pull request at https://github.com/mozilla-b2g/gaia/pull/12926

Oh my, thanks for spotting this Ben, totally my fault, as I removed it, and only added the shared version on sim_manager_test.
What I don't get is why the tests were all passing (I'm 90% sure of this) when we merged :S
Attachment #818633 - Flags: review?(fernando.campo) → review+
status-b2g-v1.2: --- → affected
(Assignee)

Comment 3

4 years ago
Thanks Fernando!  Merged:

  https://github.com/mozilla-b2g/gaia/commit/715e21936db3e6f67dc27eff412b7b901a11734a
(Assignee)

Comment 4

4 years ago
This probably was passing on travis because we run in batched mode there.  So the require() from the other test file was leaking into the navigation test allowing it to run.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

4 years ago
Ack, this only fixed one case.  Apparently there are more.  :-(  Now that I can run the same tbpl tests locally I see:

gaia-unit-tests TEST-UNEXPECTED-FAIL | communications/ftu/test/unit/operatorVariant_test.js | operatorVariant set First run state > "before all" hook | Mock MockIccHelper has not been loaded into the test
gaia-unit-tests TEST-UNEXPECTED-FAIL | communications/ftu/test/unit/variant_test.js |  "before all" hook | Mock MockIccHelper has not been loaded into the test
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 6

4 years ago
Created attachment 819191 [details]
Part 2 pull request at https://github.com/mozilla-b2g/gaia/pull/12944

This fixes the other cases where we are requiring the old ftu mock_icc_helper.js file.  (I would kind of like to r=me this since its nearly identical to the previous commit...)
Attachment #819191 - Flags: review?(fernando.campo)
Attachment #819191 - Flags: review?(fernando.campo) → review+
(Assignee)

Comment 7

4 years ago
Thanks!  Sorry again for missing these other instances on the previous pull.

Merged:

  https://github.com/mozilla-b2g/gaia/commit/35b5c926e952c505dcc7f563a26f3640364326f3
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.