test: extract run command test helpers
Description
Extract test helpers from runCommand
test function:
-
InitIOStreams
to initialize default streams -
InitFactory
to prepareFactory
struct fromcmdutils
package -
ExecuteCmd
to configure default options and run a command
Related Issues
Resolves #1160 (closed)
How has this been tested?
By running the test suite. There are no production code changes.
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Tests refactoring
Closes #1160 (closed)