Skip to content

Commit ffaff5a

Browse files
committed
TEST TMP: describe metrics pod on failure
Signed-off-by: Todd Short <[email protected]>
1 parent ae0b775 commit ffaff5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/metrics_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ func (c *MetricsTestConfig) validate(t *testing.T, token string) {
159159
t.Log("Waiting for the curl pod to be ready")
160160
waitCmd := exec.Command(c.client, "wait", "--for=condition=Ready", "pod", c.curlPodName, "--namespace", c.namespace, "--timeout=60s")
161161
waitOutput, waitErr := waitCmd.CombinedOutput()
162-
require.NoError(t, waitErr, "Error waiting for curl pod to be ready: %s", string(waitOutput))
162+
if waitErr != nil {
163+
if output, err := exec.Command(c.client, "describe", "pod", c.curlPodName, "--namespace", c.namespace).CombinedOutput(); err != nil {
164+
t.Logf("describe errored pod %s -n %s: %s", c.curlPodName, c.namespace, output)
165+
}
166+
require.NoError(t, waitErr, "Error waiting for curl pod to be ready: %s", string(waitOutput))
167+
}
163168

164169
t.Log("Validating the metrics endpoint")
165170
curlCmd := exec.Command(c.client, "exec", c.curlPodName, "--namespace", c.namespace, "--",

0 commit comments

Comments
 (0)