Description
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.