• 
      

    Fix regressions in the rbintegrations test suites.

    Review Request #11198 — Created Sept. 23, 2020 and submitted — Latest diff uploaded

    Information

    rbintegrations
    release-1.0.x

    Reviewers

    Some recent changes broke a few of the rbintegrations tests. These
    affected CircleCI, Travis CI, Slack, and Mattermost.

    The CircleCI and Travis CI tests attempt an authorization on GitHub, but
    the changes to move to token-based authentication resulted in some
    changes to the HTTP methods performed to the GitHub API. The unit tests
    weren't spying on the new methods, causing our tests to hit the API and
    fail. Now, we spy on both methods, allowing compatibility with a larger
    range of Review Board versions.

    They've also been updated to provide two versions of the HTTP headers,
    in order to fix address case normalization issues.

    Travis CI got some fixes for reloading models. Newer unit tests added
    calls to refresh_from_db(), which isn't available for Review Board 3.0.

    Slack and Mattermost were both creating a review request, changing the
    ID, and then saving, which wasn't particularly safe, and led to some
    issues with RelationCounterField in a test. We now set the ID when
    creating the review requests.

    Unit tests pass for Review Board 3.0. Some work is still required for
    4.0, which will be fixed separately.

    Commits

    Files