Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-1924

Migrate direct runGetOut() to use CommandRunner in the MCD

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • MCO Sprint 282, MCO Sprint 283
    • 0

      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.

      1. Extending it's usages to replace all the calls to exec.Command that are not the ones of (runCmdSync).
      2. Update the unit tests to run, if possible, the mocked commands.
      3. Remove the runGetOut free function

      Acceptance Criteria:
        - All direct runGetOut() calls migrated to use CommandRunner interface
        - Global runGetOut() wrapper 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

              rh-ee-ijanssen Isabella Janssen
              rh-ee-pabrodri Pablo Rodriguez Nava
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: