summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
author5eraph <5eraph@protonmail.com>2020-08-04 15:18:02 +0200
committer5eraph <5eraph@protonmail.com>2020-08-07 19:34:45 +0200
commite6a5a56aa6b0ef25eb6ae47de6b5415f84259991 (patch)
tree9ad8a3ed337010ab2ecd95affb09931bbdff8950 /test/utils/utils.go
parent2e3928ee1740c0eb2564ea6bb3004ad5b698ff8f (diff)
downloadpodman-e6a5a56aa6b0ef25eb6ae47de6b5415f84259991.tar.gz
podman-e6a5a56aa6b0ef25eb6ae47de6b5415f84259991.tar.bz2
podman-e6a5a56aa6b0ef25eb6ae47de6b5415f84259991.zip
changes to support outbound-addr
Fixes #6064 Signed-off-by: Bohumil Cervenka <5eraph@protonmail.com>
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 2c454f532..8ee702423 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -341,6 +341,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 {