Skip to content

Commit 4d09d8a

Browse files
author
OpenShift Bot
authored
Merge pull request #13692 from gabemontero/extTestDbg
Merged by openshift-bot
2 parents 0b59bc9 + 842ba8d commit 4d09d8a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

test/extended/image_ecosystem/helper.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77

88
"k8s.io/kubernetes/pkg/labels"
99

10+
g "github.com/onsi/ginkgo"
11+
1012
exutil "github.com/openshift/origin/test/extended/util"
1113
)
1214

@@ -26,7 +28,11 @@ func RunInPodContainer(oc *exutil.CLI, selector labels.Selector, cmd []string) e
2628
}
2729
args := []string{pod.Name, "-c", pod.Spec.Containers[0].Name, "--"}
2830
args = append(args, cmd...)
29-
return oc.Run("exec").Args(args...).Execute()
31+
output, err := oc.Run("exec").Args(args...).Output()
32+
if err == nil {
33+
fmt.Fprintf(g.GinkgoWriter, "RunInPodContainer exec output: %s", output)
34+
}
35+
return err
3036
}
3137

3238
// CheckPageContains makes a http request for an example application and checks
@@ -41,5 +47,9 @@ func CheckPageContains(oc *exutil.CLI, endpoint, path, contents string) (bool, e
4147
if err != nil {
4248
return false, err
4349
}
44-
return strings.Contains(response, contents), nil
50+
success := strings.Contains(response, contents)
51+
if !success {
52+
fmt.Fprintf(g.GinkgoWriter, "CheckPageContains was looking for %s but got %s", contents, response)
53+
}
54+
return success, nil
4555
}

test/extended/image_ecosystem/s2i_python.go

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt
5858
o.Expect(err).NotTo(o.HaveOccurred())
5959

6060
result, err := CheckPageContains(oc, dcName, "", pageCountFn(i))
61+
if err != nil || !result {
62+
exutil.DumpDeploymentLogs(dcName, oc)
63+
}
6164
o.Expect(err).NotTo(o.HaveOccurred())
6265
o.Expect(result).To(o.BeTrue())
6366
}

0 commit comments

Comments
 (0)