mirror of https://github.com/hashicorp/consul
Use t.Helper in testutil/retry
parent
bb6737dc60
commit
587dcebfca
|
@ -23,6 +23,8 @@ import (
|
||||||
|
|
||||||
// Failer is an interface compatible with testing.T.
|
// Failer is an interface compatible with testing.T.
|
||||||
type Failer interface {
|
type Failer interface {
|
||||||
|
Helper()
|
||||||
|
|
||||||
// Log is called for the final test output
|
// Log is called for the final test output
|
||||||
Log(args ...interface{})
|
Log(args ...interface{})
|
||||||
|
|
||||||
|
@ -116,6 +118,7 @@ func dedup(a []string) string {
|
||||||
func run(r Retryer, t Failer, f func(r *R)) {
|
func run(r Retryer, t Failer, f func(r *R)) {
|
||||||
rr := &R{}
|
rr := &R{}
|
||||||
fail := func() {
|
fail := func() {
|
||||||
|
t.Helper()
|
||||||
out := dedup(rr.output)
|
out := dedup(rr.output)
|
||||||
if out != "" {
|
if out != "" {
|
||||||
t.Log(out)
|
t.Log(out)
|
||||||
|
|
Loading…
Reference in New Issue