Skip to content

Commit

Permalink
dump build pod YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
adambkaplan committed Aug 23, 2021
1 parent 0b68012 commit 8011a19
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/e2e/removed_test.go
Expand Up @@ -143,19 +143,27 @@ func dumpBuildInfo(ctx context.Context, te framework.TestEnv, nsName string, bui
return
}
te.Log("attempting to dump build information")
buildLogs, err := framework.GetLogsForPod(te.Client(), nsName, fmt.Sprintf("%s-build", buildName))
buildPodName := fmt.Sprintf("%s-build", buildName)
buildLogs, err := framework.GetLogsForPod(te.Client(), nsName, buildPodName)
if err != nil {
te.Logf("failed to get build logs: %v", err)
} else {
te.Logf("Build pod logs:")
te.Logf("Build logs:")
framework.DumpPodLogs(te, buildLogs)
}

build, err := te.Client().BuildInterface.Builds(nsName).Get(ctx, buildName, metav1.GetOptions{})
if err != nil {
te.Logf("failed to get build YAML: %v", err)
} else {
framework.DumpYAML(te, "build pod YAML", build)
framework.DumpYAML(te, "build YAML", build)
}

buildPod, err := te.Client().CoreV1Interface.Pods(nsName).Get(ctx, buildPodName, metav1.GetOptions{})
if err != nil {
te.Logf("failed to get build pod YAML: %v", err)
} else {
framework.DumpYAML(te, "build pod YAML", buildPod)
}

configMaps, err := te.Client().CoreV1Interface.ConfigMaps(nsName).List(ctx, metav1.ListOptions{})
Expand Down

0 comments on commit 8011a19

Please sign in to comment.