Closed Bug 1089455 Opened 10 years ago Closed 10 years ago

[PulseGuardian] Set up CI

Categories

(Webtools :: Pulse, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcote, Unassigned)

Details

We have tests, but it appears they are failing, probably since I introduced multi-user support and forgot to run them.

Not only should they be fixed, but we should set up CI via Travis or such.
Taking a quick look at the errors generated by runtests.py:

1) TypeError: new_user() got an unexpected keyword argument 'email' 

The definition of PulseUser.new_user is: 
    'def new_user(username, password='', owner=None, management_api=None)' 
which  means no email argument.
 
2) NameError: global name 'User' is not defined 

User is not imported. But even if it is, it will fail because the definition for User.new_user is: 
    def new_user(email, admin=False)
which doesn't have username, password and management_api.
Summary: Set up CI → [PulseGuardian] Set up CI
I fixed up the tests; until we have CI running, we'll have to remember to run them ourselves. :)

https://github.com/mozilla/pulseguardian/commit/489b5d33dafd6c71793ae3cfc4cc1e82122829e4

We're probably going to have to get docker working (bug 1089457) to have any hope of running these in a CI.  Otherwise we'll have to mock out the RabbitMQ parts, which won't be easy.
Depends on: 1089457
Actually I stand corrected; you can install whatever Ubuntu packages you require with Travis CI: http://docs.travis-ci.com/user/installing-dependencies/  So we can just install RabbitMQ as part of the test setup.

Having docker for local testing would still be great, but it looks like it's not required for CI at least.
No longer depends on: 1089457
Cool :)

I also had a quick look and it seems that way. I believe we can setup Travis CI and after that's completed we can put some effort into having docker for local testing.

I don't have much experience with Docker, but I was looking for an "excuse" to work and understand it :)
I've started working on this so I may as well bring it over the finish line.  Feel free to take the docker one. :)
Assignee: nobody → mcote
Status: NEW → ASSIGNED
OS: Mac OS X → Linux
Wow, that was shockingly easy!  Results are now available at https://travis-ci.org/mozilla/pulseguardian, and the last status is embedded in the README.

I've set it up to notify IRC when tests fail, or when they've changed from failure to success.

https://github.com/mozilla/pulseguardian/compare/489b5d33dafd6c71793ae3cfc4cc1e82122829e4...92f8963e6eaa
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.