瀏覽代碼

integration-cli: remove transformCmd utility

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 年之前
父節點
當前提交
b4ff5234bd
共有 1 個文件被更改,包括 3 次插入8 次删除
  1. 3 8
      integration-cli/utils_test.go

+ 3 - 8
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/<pid>/cgroup', and returns