summaryrefslogtreecommitdiff
path: root/test/utils/utils.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-08-03 15:41:25 -0700
committerJhon Honce <jhonce@redhat.com>2020-08-05 10:19:44 -0700
commit98da2fa80657fecb6b083eaf68974d2ee2f84e6a (patch)
tree713bc5b261e4f1c1ddd9ef71f3392238b62ddb22 /test/utils/utils.go
parentd1aaf3362204f860267e2bb58ec419b25edc5800 (diff)
downloadpodman-98da2fa80657fecb6b083eaf68974d2ee2f84e6a.tar.gz
podman-98da2fa80657fecb6b083eaf68974d2ee2f84e6a.tar.bz2
podman-98da2fa80657fecb6b083eaf68974d2ee2f84e6a.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/utils/utils.go')
-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 2c454f532..b279a7084 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, " ")
}