mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 21:57:09 +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) {
|
||||
http.Error(w, "test error", http.StatusBadRequest)
|
||||
}),
|
||||
expectedErrorContains: "test error",
|
||||
expectedErrorContains: "test error\n",
|
||||
unwrap: true,
|
||||
},
|
||||
}
|
||||
@ -377,7 +377,7 @@ func TestReadClient(t *testing.T) {
|
||||
require.ErrorContains(t, err, test.expectedErrorContains)
|
||||
if test.unwrap {
|
||||
err = errors.Unwrap(err)
|
||||
require.EqualError(t, err, test.expectedErrorContains+"\n")
|
||||
require.EqualError(t, err, test.expectedErrorContains)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user