[Maas-devel] Tests and cluster RPC commands

Graham Binns graham.binns at canonical.com
Thu Sep 11 08:29:38 UTC 2014


On 11 September 2014 03:00, Julian Edwards <julian.edwards at canonical.com> wrote:
> I think we can have some middle ground here.  If we make the RPC fixture
> available by default (as in #2, like Celery was) but make it return sane
> errors when some RPC gets called that is not mocked yet, then we get notified
> that you're in one of these situations:
>  1. you might not be unit testing what you think you are
>  2. you might need to set a canned response
>
> We would need a similar thing in reverse for the pserv tests, so that the test
> case has a default region fixture.
>

I like this approach. It sounds, by and large, like what I had to do
to get the end-to-end tests for create_node() working. The region had
to query the cluster for supported OSes and architectures before it
could build the form through which we created the node. An awful lot
of mockery went into making sure that everything worked smoothly.




More information about the Maas-devel mailing list