summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-08-03 15:41:25 -0700
committerPaul Holzinger <paul.holzinger@web.de>2020-08-30 12:11:19 +0200
commit33cf7aec51eec726544499189b20ee1395b9f513 (patch)
treefb1a06593e6fbb059eb919d575044bd92c1cdd57 /test
parent3ae1cd806c9125e48af08368e488ea39cd28256d (diff)
downloadpodman-33cf7aec51eec726544499189b20ee1395b9f513.tar.gz
podman-33cf7aec51eec726544499189b20ee1395b9f513.tar.bz2
podman-33cf7aec51eec726544499189b20ee1395b9f513.zip
Refactor parsing to not require --remote to be first
Use cobra.Command.FParseErrWhitelist to no longer require --remote to be the first argument in flags when using CLI Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/utils/utils.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 0597cd292..20e185fc1 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -207,6 +207,10 @@ func WaitContainerReady(p PodmanTestCommon, id string, expStr string, timeout in
// OutputToString formats session output to string
func (s *PodmanSession) OutputToString() string {
+ if s == nil || s.Out == nil || s.Out.Contents() == nil {
+ return ""
+ }
+
fields := strings.Fields(string(s.Out.Contents()))
return strings.Join(fields, " ")
}