mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
test helpers: Always print stack trace
This commit is contained in:
parent
eeec0d63c2
commit
0a752b9fab
@ -27,9 +27,9 @@ func IsFatal(err error) bool {
|
|||||||
return ok && e.Fatal()
|
return ok && e.Fatal()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatal returns an error which implements the Fataler interface.
|
// Fatal returns a wrapped error which implements the Fataler interface.
|
||||||
func Fatal(s string) error {
|
func Fatal(s string) error {
|
||||||
return fatalError(s)
|
return Wrap(fatalError(s), "Fatal")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatalf returns an error which implements the Fataler interface.
|
// Fatalf returns an error which implements the Fataler interface.
|
||||||
|
@ -41,7 +41,7 @@ func OKs(tb testing.TB, errs []error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
errFound = true
|
errFound = true
|
||||||
_, file, line, _ := runtime.Caller(1)
|
_, file, line, _ := runtime.Caller(1)
|
||||||
fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error())
|
fmt.Printf("\033[31m%s:%d: unexpected error: %+v\033[39m\n\n", filepath.Base(file), line, err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if errFound {
|
if errFound {
|
||||||
|
Loading…
Reference in New Issue
Block a user