mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-20 03:47:54 +02:00
Attempt to fix gotestsum skipping tests by adding a prefix so that test output doesn't begin with panic:
This commit is contained in:
parent
50c6f5e061
commit
b6885cca98
@ -79,7 +79,7 @@ func TestLoggerMiddlewareWithPanic(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPanicGuard(t *testing.T) {
|
func TestPanicGuard(t *testing.T) {
|
||||||
t.Skip("TODO: Re-enable this without it breaking gotestsum")
|
fmt.Println("Output prefix to avoid breaking gotestsum with panics")
|
||||||
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
panic(fmt.Errorf("synthetic panic for tests"))
|
panic(fmt.Errorf("synthetic panic for tests"))
|
||||||
})
|
})
|
||||||
@ -108,7 +108,7 @@ func TestPanicGuard(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPanicGuardNoPanic(t *testing.T) {
|
func TestPanicGuardNoPanic(t *testing.T) {
|
||||||
t.Skip("TODO: Re-enable this without it breaking gotestsum")
|
fmt.Println("Output prefix to avoid breaking gotestsum with panics")
|
||||||
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user