mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 06:07:11 +02:00
Move newline to inside the expected error
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
parent
ab2d17d7a0
commit
b91c66cdf9
@ -342,7 +342,7 @@ func TestReadClient(t *testing.T) {
|
|||||||
httpHandler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
httpHandler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||||
http.Error(w, "test error", http.StatusBadRequest)
|
http.Error(w, "test error", http.StatusBadRequest)
|
||||||
}),
|
}),
|
||||||
expectedErrorContains: "test error",
|
expectedErrorContains: "test error\n",
|
||||||
unwrap: true,
|
unwrap: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -377,7 +377,7 @@ func TestReadClient(t *testing.T) {
|
|||||||
require.ErrorContains(t, err, test.expectedErrorContains)
|
require.ErrorContains(t, err, test.expectedErrorContains)
|
||||||
if test.unwrap {
|
if test.unwrap {
|
||||||
err = errors.Unwrap(err)
|
err = errors.Unwrap(err)
|
||||||
require.EqualError(t, err, test.expectedErrorContains+"\n")
|
require.EqualError(t, err, test.expectedErrorContains)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user