Comment 3 for bug 817578

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 817578] Re: provide api documentation

On Fri, Aug 5, 2011 at 12:17 AM, Aaron Peachey <email address hidden> wrote:
> We have written a 'mock server' (actually more of an interception of the
> rnr client)  for software center that we use to test various reviews
> changes in software center without hitting a real server (and offline).
> I did find myself looking at the rnr-server and rnrclient code alot when
> doing this, which makes me think this documentation would be a good idea
> for anyone else tring to write a mock implementation.

Hey Aaron! Yeah, we had a discussion the other week about whether we
should be providing mock servers as part of the projects, to allow
easy integration for users of the APIs. Interesting thinking about the
client though... given that we're providing piston-miniclients such as
rnrclient, we could possibly ship rnrclient together with
rnrclient_mock, which is configurable, but where all the calls return
sensible (configurable) values.

That would allow us on the server side to ensure that both rnrclient
and rnrclient_mock satisfy the server API, and users of the API to
write tests against the mock client. Just a thought.