Opened 4 years ago

Closed 4 years ago

#4575 closed defect (fixed)

[buildtools] Packager Edge tests fail due to OTF content type

Reported by: kzar Assignee: kvas
Priority: P3 Milestone:
Module: Automation Keywords:
Cc: kvas, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



Debian stretch, Tox 2.4.1, Python 2.7.12+, buildtools 1e56a7549872

How to reproduce

  1. Run the tests: tox

Observed behaviour

The test_full_content_types_map() test fails since the otf type has the content type of application/font-sfnt instead of the expected application/x-font-otf.

Expected behaviour

The tests pass.

Change History (7)

comment:1 Changed 4 years ago by kvas

Ok, so the mime type for otf that Python returns is somewhat platform dependent. It seems that there's not much consensus regarding what it should be. The most authoritative answer says application/font-sfnt but Microsoft and Facebook packagers just give it application/octet-stream.

Perhaps we should just override what Python gives us to be consistent between different Python environments and to be consistent with other Appx packagers. What do you think, Sebastian?

comment:2 Changed 4 years ago by kvas

  • Owner set to kvas

comment:3 Changed 4 years ago by sebastian

Assuming that Microsoft Edge will work fine with either mimetype, perhaps just make the test more tolerant here?

comment:4 Changed 4 years ago by kvas

I'm actually thinking to just set it to application/octet-stream. This is simple to do, the result will be consistent regardless on which platform we run the build and also consistent with other packagers out there, and finally it's probably less code overall (between the packager and the test).

comment:5 Changed 4 years ago by kvas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:6 Changed 4 years ago by abpbot

A commit referencing this issue has landed:
Fixes 4575 - Fix failing tests

comment:7 Changed 4 years ago by kvas

  • Priority changed from Unknown to P3
  • Ready set
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.