Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-603

Make clientv1 command hooks testable

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.6.0
    • Client
    • None

    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.

      Attachments

        Activity

          People

            mchucarroll Mark Chu-Carroll
            mchucarroll Mark Chu-Carroll
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: