Adding extra logging in case of error.

pull/6/head
Kris 2016-05-09 11:40:05 -07:00
parent e973b5d27a
commit d63a215b23
1 changed files with 6 additions and 0 deletions

View File

@ -317,6 +317,12 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
framework.CheckPodsRunningReady(c, ns, []string{netexecContainer}, framework.PodStartTimeout)
// Clean up
defer framework.Cleanup(netexecPodPath, ns, netexecPodSelector)
defer func() {
if CurrentGinkgoTestDescription().Failed {
logs, err := framework.GetPodLogs(c, ns, "netexec", "netexec")
framework.Logf("Logs for netexec pod(error: %s): %s", err, logs)
}
}()
// Upload kubeconfig
type NetexecOutput struct {
Output string `json:"output"`