Page MenuHomePhabricator

Improve per-endpoint response header testing in MCS
Closed, ResolvedPublic

Description

With T197792 we're now expecting different headers for different content responses, but we're not testing this:

  • check for an invalid absence of a vary or content-language header
  • check that headers we didn't expect to be present were

Event Timeline

Implementation idea: it would be worth exploring whether what we need can be done entirely via response specifications in spec.js.

Feel free to downgrade but this comes up a lot. IMO we should get to this soon.

Sounds good. Ideally next time please lets add tests with the patches that add the features. Tests and docs should be as first class as the code itself.

Change 460004 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Leverage spec checks for checking headers

https://gerrit.wikimedia.org/r/460004

Change 460004 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Leverage spec checks for checking response headers

https://gerrit.wikimedia.org/r/460004

When the Accept-Language header stuff is ready we could also add an x-ample which triggers the vary header of the response having Accept-Language also.