mozilla-services/android-sync — comment on commit a2e45d1c99fe8d61db9049f2ff2aa6537b0b42a1
File:  line 0
By rnewman:

I think you need to split your tests in two… corresponding to the two bugs :)

You can test almost everything without HTTP at all — after all, you just built a ClientsRepository, right? So instantiate one, push records in and out, make sure it does what you expect.

Then you can test the next layer by bringing up your own test HTTP server (take a look at the existing tests), which will allow you to see both ends of the exchange, and will remove our dependency on production Sync infrastructure!

Finally, if you really, really want to, you can rename part of these tests "TestRealClientsEngine", and have them talk to phx.

So:

* Unit test as best you can;
* Layer integration tests on top of that;
* Finally, layer on real-world smoke tests.

Test the smallest thing you can. You're not doing that in these tests.