mozilla/picl-server — pull request #39 by rfk (2013-02-27 03:33:41+00:00)
Title: Run integration tests against a live server

(not yet ready for merge)

This is an experiment in re-using the integration tests for acceptance testing of a live server instance. As before, doing the usual `npm test` will run tests against an in-memory Hapi server using inject(). But if you specify TEST_REMOTE environment variable, then the tests will be redirected at a live server. If you've got it running locally:

$ TEST_REMOTE=http://localhost:8080 npm test

I'm not thrilled about the naming of functions makeLiveRequest/makeInjectRequest/bindMakeRequest, any suggestions would be appreciated. But the overall approach seems to work well.

For this to be truly useful, we need to make the tests do proper cleanup so that they can be run multiple times against a single server. I've made a start on this for the syncstore routes, but auth and blob tests also need to be tweaked.

@zaach @ckarlof thoughts?