Skip to content

Commit 4e66984

Browse files
mattmoortekton-robot
authored andcommitted
Include message on reason-mismatch failures
1 parent 68e6146 commit 4e66984

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/v1alpha1/wait.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func FailedWithReason(reason, name string) ConditionAccessorFn {
210210
if c.Reason == reason {
211211
return true, nil
212212
}
213-
return true, fmt.Errorf("%q completed with the wrong reason: %s", name, c.Reason)
213+
return true, fmt.Errorf("%q completed with the wrong reason: %s (message: %s)", name, c.Reason, c.Message)
214214
} else if c.Status == corev1.ConditionTrue {
215215
return true, fmt.Errorf("%q completed successfully, should have been failed with reason %q", name, reason)
216216
}

test/wait.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func FailedWithReason(reason, name string) ConditionAccessorFn {
210210
if c.Reason == reason {
211211
return true, nil
212212
}
213-
return true, fmt.Errorf("%q completed with the wrong reason: %s", name, c.Reason)
213+
return true, fmt.Errorf("%q completed with the wrong reason: %s (message: %s)", name, c.Reason, c.Message)
214214
} else if c.Status == corev1.ConditionTrue {
215215
return true, fmt.Errorf("%q completed successfully, should have been failed with reason %q", name, reason)
216216
}

0 commit comments

Comments
 (0)