Fix webhook response in TravisCI integration, test failures.

Review Request #10655 — Created Aug. 7, 2019 and submitted

Information

rbintegrations
release-1.0.x
5e94e85...

Reviewers

This change adds a missing HttpResponse return to the TravisCI
webhook. We didn't notice this before because by the time the error
gets triggered, everything has already been processed and updated, so
it's just something that triggers an error email to the server admins.

While I was doing this I found there were a handful of test failures.
Some args-vs-kwargs problems were causing a few tests to error out,
either with a duplicate kwarg error or a type error; these were easily
fixed by specifying kwarg names for all IntegrationForm
instantiations. There were also some warnings coming from kgb about
missing owner= parameters.

Ran unit tests.

Description From Last Updated

E501 line too long (82 > 79 characters)

reviewbotreviewbot

All these plain return statements are problematic too. We have to make sure we're always returning some HttpResponse object. Same …

chipx86chipx86

The error responses should be a HttpResponseBadRequest, so the other end can report that there was a problem instead of …

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. 
      
  2. rbintegrations/travisci/views.py (Diff revision 2)
     
     
    Show all issues

    All these plain return statements are problematic too. We have to make sure we're always returning some HttpResponse object.

    Same in CircleCI.

  3. 
      
david
chipx86
  1. 
      
  2. rbintegrations/circleci/views.py (Diff revision 3)
     
     
    Show all issues

    The error responses should be a HttpResponseBadRequest, so the other end can report that there was a problem instead of appearing successful.

    Honestly, I don't know if Travis CI or CircleCI provide this reporting, but I know plenty of places like GitHub do (and we certainly should start doing that in RB at some point... but I digress).

    1. I don't think they do but it's easy enough to return errors.

  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.0.x (047f06f)