From b4ff5234bd4bc06bbff9e7d134c778c06923c8bc Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 27 Jul 2023 12:49:25 +0200 Subject: [PATCH] integration-cli: remove transformCmd utility Signed-off-by: Sebastiaan van Stijn --- integration-cli/utils_test.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/integration-cli/utils_test.go b/integration-cli/utils_test.go index 1be232afe0..97b4e22ddc 100644 --- a/integration-cli/utils_test.go +++ b/integration-cli/utils_test.go @@ -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//cgroup', and returns