summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-09 07:45:20 -0400
committerGitHub <noreply@github.com>2020-08-09 07:45:20 -0400
commit95e2e15a3f13babfabb1b8d192893a56719d79a9 (patch)
tree6a451e8d4b2edf174c9adc5fe3e33a702d2807f9 /test/utils/utils.go
parent3173a18f6f97ddb684230296054216b526a54f0e (diff)
parente6a5a56aa6b0ef25eb6ae47de6b5415f84259991 (diff)
downloadpodman-95e2e15a3f13babfabb1b8d192893a56719d79a9.tar.gz
podman-95e2e15a3f13babfabb1b8d192893a56719d79a9.tar.bz2
podman-95e2e15a3f13babfabb1b8d192893a56719d79a9.zip
Merge pull request #7216 from 5eraph/master
support outbound-addr
Diffstat (limited to 'test/utils/utils.go')
-rw-r--r--test/utils/utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index b279a7084..a45ce7b36 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -345,6 +345,16 @@ func SystemExec(command string, args []string) *PodmanSession {
return &PodmanSession{session}
}
+// StartSystemExec is used to start exec a system command
+func StartSystemExec(command string, args []string) *PodmanSession {
+ c := exec.Command(command, args...)
+ session, err := gexec.Start(c, GinkgoWriter, GinkgoWriter)
+ if err != nil {
+ Fail(fmt.Sprintf("unable to run command: %s %s", command, strings.Join(args, " ")))
+ }
+ return &PodmanSession{session}
+}
+
// StringInSlice determines if a string is in a string slice, returns bool
func StringInSlice(s string, sl []string) bool {
for _, i := range sl {