Skip to content

Commit

Permalink
integration-cli: remove transformCmd utility
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Oct 19, 2023
1 parent 29d863d commit b4ff523
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions integration-cli/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,14 @@ func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) {
// TODO: update code to call cmd.RunCmd directly, and remove this function
// Deprecated: use gotest.tools/icmd
func runCommandWithOutput(execCmd *exec.Cmd) (string, int, error) {
result := icmd.RunCmd(transformCmd(execCmd))
return result.Combined(), result.ExitCode, result.Error
}

// Temporary shim for migrating commands to the new function
func transformCmd(execCmd *exec.Cmd) icmd.Cmd {
return icmd.Cmd{
result := icmd.RunCmd(icmd.Cmd{
Command: execCmd.Args,
Env: execCmd.Env,
Dir: execCmd.Dir,
Stdin: execCmd.Stdin,
Stdout: execCmd.Stdout,
}
})
return result.Combined(), result.ExitCode, result.Error
}

// ParseCgroupPaths parses 'procCgroupData', which is output of '/proc/<pid>/cgroup', and returns
Expand Down

0 comments on commit b4ff523

Please sign in to comment.