Fix CircleCI and Travis CI tests on Review Board 4.0.

Review Request #11204 — Created Sept. 25, 2020 and submitted

Information

rbintegrations
master

Reviewers

Review Board 4.0 introduced a new set of HTTP request/response classes
for hosting services, making it easier to maintain support for services
in a consistent way. This impacted the unit tests for CircleCI and
Travis CI, which were both trying to simulate an HTTP request by
overriding some HTTP methods on the GitHub HTTP client class.

While there were recent fixes to these tests specific to Review Board
3.0, they didn't fix Review Board 4.0. Initially, the problem was that
the HTTP headers simulated weren't being seen by the GitHub
implementation, since there were differences in casing between the
versions (or, more specifically, between Review Board 3.0 on Python 2
and Review Board 4.0 on Python 3).

/r/11199 addressed part of this by updating how HTTP headers are
normalized, and /r/11200 updated GitHub to use the new HTTP classes.
This test completes the work by updating these tests to return the
correct HostingServiceHTTPResponse class now expected by GitHub,
fixing the unit tests across all supported versions of both Python and
Review Board.

Unit tests pass on all supported versions of Review Board and Python.

Summary ID
Fix CircleCI and Travis CI tests on Review Board 4.0.
Review Board 4.0 introduced a new set of HTTP request/response classes for hosting services, making it easier to maintain support for services in a consistent way. This impacted the unit tests for CircleCI and Travis CI, which were both trying to simulate an HTTP request by overriding some HTTP methods on the GitHub HTTP client class. While there were recent fixes to these tests specific to Review Board 3.0, they didn't fix Review Board 4.0. Initially, the problem was that the HTTP headers simulated weren't being seen by the GitHub implementation, since there were differences in casing between the versions (or, more specifically, between Review Board 3.0 on Python 2 and Review Board 4.0 on Python 3). /r/11199 addressed part of this by updating how HTTP headers are normalized, and /r/11200 updated GitHub to use the new HTTP classes. This test completes the work by updating these tests to return the correct `HostingServiceHTTPResponse` class now expected by GitHub, fixing the unit tests across all supported versions of both Python and Review Board.
5b067f9c586858d5a9d304723ccdb8d96f247609
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (49712c7)
Loading...