This is an archive of the discontinued Mercurial Phabricator instance.

tests: teach get-with-headers.py to ignore dynamic headers
AbandonedPublic

Authored by indygreg on Mar 12 2018, 8:07 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

The Date and Server HTTP headers are dynamic by nature. They are
also present on every response and are mostly advisory.

It isn't important for us to test for the presence of these
headers. In fact, all tests currently glob over the entirety
of their values.

Having to constantly glob these headers feels like more trouble
than it is worth. Let's teach get-with-headers.py to hide them
by default.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Mar 12 2018, 8:07 PM

I’ve got a patch locally that will pattern substitute away the date. It’s been useful for LFS, because I’ve been debug dumping the headers and JSON on the client side. I’ll try to submit that tonight.

indygreg abandoned this revision.Mar 13 2018, 12:46 PM

I like Matt's patch and will do something more deterministic.