You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Mark Chu-Carroll (JIRA)" <ji...@apache.org> on 2014/07/25 22:34:38 UTC

[jira] [Created] (AURORA-603) Make clientv1 command hooks testable

Mark Chu-Carroll created AURORA-603:
---------------------------------------

             Summary: Make clientv1 command hooks testable
                 Key: AURORA-603
                 URL: https://issues.apache.org/jira/browse/AURORA-603
             Project: Aurora
          Issue Type: Task
          Components: Client
            Reporter: Mark Chu-Carroll
            Assignee: Mark Chu-Carroll


Clientv1 command hooks are directly invoked from command-functions.

This introduces a problem for testing: to test that hooks work, we need to mock out all of the stages of executing the body. This is much too complicated and error-prone.

Instead, we should separate the hooked clientv1 commands into the hooked invoker, which does some argument processing and invokes hooks; and a distinct function called by the invoker which actually contains the body of the command.

With this separation, tests can mock the command body, but run the hooks in a live command dispatch.




--
This message was sent by Atlassian JIRA
(v6.2#6252)