test: add error output for build logs
@@ -772,9 +772,9 @@ func (t *BuildResult) Logs() (string, error) {
return t.LogDumper(t.Oc, t)
}
- buildOuput, err := t.Oc.Run("logs").Args("-f", t.BuildPath, "--timestamps").Output()
+ buildOuput, buildErr, err := t.Oc.Run("logs").Args("-f", t.BuildPath, "--timestamps", "--v", "10").Outputs()
if err != nil {
- return "", fmt.Errorf("Error retrieving logs for %#v: %v", *t, err)
+ return "", fmt.Errorf("Error retrieving logs for build %q: (%s) %v", t.BuildName, buildErr, err)
}
return buildOuput, nil
@@ -790,9 +790,9 @@ func (t *BuildResult) LogsNoTimestamp() (string, error) {
return t.LogDumper(t.Oc, t)
}
- buildOuput, err := t.Oc.Run("logs").Args("-f", t.BuildPath).Output()
+ buildOuput, buildErr, err := t.Oc.Run("logs").Args("-f", t.BuildPath).Outputs()
if err != nil {
- return "", fmt.Errorf("Error retrieving logs for %#v: %v", *t, err)
+ return "", fmt.Errorf("Error retrieving logs for build %q: (%s) %v", t.BuildName, buildErr, err)
}
return buildOuput, nil
