From 02b13315129a9f4d510cd9c5a4414fe2d1f24999 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 28 May 2015 17:03:55 -0700 Subject: [PATCH] Use spew for more informative debug output --- test/e2e/util.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/util.go b/test/e2e/util.go index a50f089afa1..e1e2747e525 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -30,8 +30,6 @@ import ( "strings" "time" - "code.google.com/p/go-uuid/uuid" - "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd" @@ -42,6 +40,8 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/labels" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" + "code.google.com/p/go-uuid/uuid" + "github.com/davecgh/go-spew/spew" "golang.org/x/crypto/ssh" . "github.com/onsi/ginkgo" @@ -224,6 +224,7 @@ func waitForPodCondition(c *client.Client, ns, podName, desc string, poll, timeo } // createNS should be used by every test, note that we append a common prefix to the provided test name. +// Please see NewFramework instead of using this directly. func createTestingNS(baseName string, c *client.Client) (*api.Namespace, error) { namespaceObj := &api.Namespace{ ObjectMeta: api.ObjectMeta{ @@ -242,7 +243,7 @@ func waitForPodRunningInNamespace(c *client.Client, podName string, namespace st return true, nil } if pod.Status.Phase == api.PodFailed { - return true, fmt.Errorf("Giving up; pod went into failed status: \n%#v", pod.Status) + return true, fmt.Errorf("Giving up; pod went into failed status: \n%s", spew.Sprintf("%#v", pod)) } return false, nil })