mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-06 23:22:11 -04: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
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue