Skip to content

Commit

Permalink
Include message on reason-mismatch failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmoor authored and tekton-robot committed Oct 26, 2020
1 parent 68e6146 commit 4e66984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/v1alpha1/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func FailedWithReason(reason, name string) ConditionAccessorFn {
if c.Reason == reason {
return true, nil
}
return true, fmt.Errorf("%q completed with the wrong reason: %s", name, c.Reason)
return true, fmt.Errorf("%q completed with the wrong reason: %s (message: %s)", name, c.Reason, c.Message)
} else if c.Status == corev1.ConditionTrue {
return true, fmt.Errorf("%q completed successfully, should have been failed with reason %q", name, reason)
}
Expand Down
2 changes: 1 addition & 1 deletion test/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func FailedWithReason(reason, name string) ConditionAccessorFn {
if c.Reason == reason {
return true, nil
}
return true, fmt.Errorf("%q completed with the wrong reason: %s", name, c.Reason)
return true, fmt.Errorf("%q completed with the wrong reason: %s (message: %s)", name, c.Reason, c.Message)
} else if c.Status == corev1.ConditionTrue {
return true, fmt.Errorf("%q completed successfully, should have been failed with reason %q", name, reason)
}
Expand Down

0 comments on commit 4e66984

Please sign in to comment.