twitter-archive / diffy

Find potential bugs in your services with Diffy
https://twitter.com/diffyproject
Apache License 2.0
3.83k stars 368 forks source link

Date header - should it be tested? #33

Closed ghost closed 4 years ago

ghost commented 8 years ago

Hello, I'm testing my APIs and I found out that Diffy is comparing date headers what is leading to testing fails. My point is: should it be tested in the first place? It is default Apache header and there will always be a possibility for some slight differences in returned time. It's not really a fail/concern when testing APIs. Am I right?

Date header is not detected as a "noise" when primary and secondary returns the same time.

regards, Mike

SenhorCastor commented 8 years ago

Same here, its comparing headers, and finding differences on Date, Is there a way to whitelist headers?

puneetkhanduri commented 8 years ago

Diffy doesn't support custom field exclusion but you can disable all header comparison by setting the excludeHttpHeadersComparison flag to true in your deploy script.

See: https://github.com/twitter/diffy/blob/master/src/main/scala/com/twitter/diffy/DiffyServiceModule.scala#L67