~wallyworld/goose/RunServer-userData-fix

Viewing all changes in revision 54.

  • Committer: Ian Booth
  • Date: 2013-01-29 13:13:54 UTC
  • mfrom: (51.1.5 control-test-doubles)
  • Revision ID: ian.booth@canonical.com-20130129131354-2wxnwngyjuq3lj11
Error testing infrastructure for service doubles

This branch provides infrastructure to allow tests to specify that the service
doubles should return an error at various points.
The basic premise is that the test provides a hook which is run at the specfied point in time eg when a specific function runs. 
The hook is passed the service double and any function arguments. It can inspect the state of the service and the function args and
can decide to return an error if it wants to.

The diff conatins a practical example of this being used - 3 security groups are
created and an error is raised when the second one is deleted.

This work doesn't have to be used to raise an error - the hook can also be used to modify the sate of the service double and simply exit without error.

R=jameinel
CC=
https://codereview.appspot.com/7204055

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: