Skip to content

MK8S-79 - commandrunners: Add path parameter#38

Merged
vdaviot merged 3 commits intomainfrom
improvement/MK8S-79-add-path-commandrunner
Mar 9, 2026
Merged

MK8S-79 - commandrunners: Add path parameter#38
vdaviot merged 3 commits intomainfrom
improvement/MK8S-79-add-path-commandrunner

Conversation

@vdaviot
Copy link
Contributor

@vdaviot vdaviot commented Mar 4, 2026

No description provided.

Signed-off-by: Valentin Daviot <valentin.daviot@scality.com>
@vdaviot vdaviot requested a review from a team as a code owner March 4, 2026 16:13
commandrunner.LSBLKExecCommand = mockedExecCommand

runner := commandrunner.NewLSBLK()
runner := commandrunner.NewLSBLK(nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not giving a path as arg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't need to, I want to test the default behavior, so not providing a path is the way IMO

commandrunner.MDADMExecCommand = mockedExecCommand

runner := commandrunner.NewMDADM()
runner := commandrunner.NewMDADM(nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

commandrunner.SmartCTLExecCommand = mockedExecCommand

runner := commandrunner.NewSmartCTL()
runner := commandrunner.NewSmartCTL(nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

func NewSSACLI() *SSACLI {
func NewSSACLI(path *string) *SSACLI {
cliPath := SSACLIPath
if path != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

func NewUDevADM() *UDevADM {
func NewUDevADM(path *string) *UDevADM {
cliPath := UDevADMBinaryPath
if path != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

commandrunner.UDevADMExecCommand = mockedExecCommand

runner := commandrunner.NewUDevADM()
runner := commandrunner.NewUDevADM(nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

vdaviot added 2 commits March 5, 2026 16:23
Signed-off-by: Valentin Daviot <valentin.daviot@scality.com>
Signed-off-by: Valentin Daviot <valentin.daviot@scality.com>
@vdaviot vdaviot merged commit bc17eea into main Mar 9, 2026
3 checks passed
@vdaviot vdaviot deleted the improvement/MK8S-79-add-path-commandrunner branch March 9, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants