Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/extended/registry/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,16 @@ func GetRegistryPod(podsGetter kcoreclient.PodsGetter) (*kapiv1.Pod, error) {
return &podList.Items[0], nil
}

// LogRegistryPod attempts to write registry log to a file to recent test's output directory.
// LogRegistryPod attempts to write registry log to a file in artifacts directory.
func LogRegistryPod(oc *exutil.CLI) error {
pod, err := GetRegistryPod(oc.KubeClient().Core())
if err != nil {
return fmt.Errorf("failed to get registry pod: %v", err)
}
path, err := oc.Run("logs").Args("dc/docker-registry").OutputToFile("pod-" + pod.Name + ".log")

ocLocal := *oc
ocLocal.SetOutputDir(exutil.ArtifactDirPath())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe exutil.ArtifactDirPath() returns a root dir for the artifacts - the one you can see in this view: https://ci.openshift.redhat.com/jenkins/view/Origin%20Test%20Jobs/job/test_branch_origin_extended_builds/238/s3/

I can see the artifacts dir in the view of prow runs: https://gcsweb-ci.svc.ci.openshift.org/gcs/origin-ci-test/pr-logs/pull/16859/test_pull_request_origin_extended_image_registry/36/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i was thinking it was the testadata fixture path, i guess i'm wrong.

path, err := ocLocal.Run("logs").Args("dc/docker-registry").OutputToFile("pod-" + pod.Name + ".log")
if err == nil {
fmt.Fprintf(g.GinkgoWriter, "written registry pod log to %s\n", path)
}
Expand Down