-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
Story:
A CommandRunner interface was introduced in OCPBUGS-62714 as part of a bugfix. This interface abstracts command execution (exec.Command) to improve testability and flexibility, but it's not complete and it's not consumed as a central API to run exec commands in the MCD due to the bugfix nature of the original PR.
- Extending it's usages to replace all the calls to exec.Command that are not the ones of runGetOut (that effort is covered by MCO-1924).
- Update the unit tests to run, if possible, the mocked commands.
- Remove the runCmdSync free function
Acceptance Criteria:
- All direct runCmdSync() calls migrated to use CommandRunner interface
- Global runCmdSync() function removed
- All affected structs use dependency injection for CommandRunner
- Existing tests updated and passing
- New unit tests added for migrated code
- No regression in functionality