From b91c66cdf980862d33d6d5d124782a49beb25ae4 Mon Sep 17 00:00:00 2001 From: Jeanette Tan Date: Wed, 16 Apr 2025 17:58:19 +0800 Subject: [PATCH] Move newline to inside the expected error Signed-off-by: Jeanette Tan --- storage/remote/client_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/remote/client_test.go b/storage/remote/client_test.go index 39e0dd9402..27a322c39f 100644 --- a/storage/remote/client_test.go +++ b/storage/remote/client_test.go @@ -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 }