From 9ddfa64457f18845110412e449e4ea51b0d61ac7 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Sat, 14 Dec 2024 22:01:55 +0700 Subject: [PATCH] fix unit tests --- connector/connector_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connector/connector_test.go b/connector/connector_test.go index 727ace8..f6e4cba 100644 --- a/connector/connector_test.go +++ b/connector/connector_test.go @@ -202,7 +202,7 @@ func TestHTTPConnector_authentication(t *testing.T) { Details: schema.ExplainResponseDetails{ "url": server.URL + "/pet", "headers": `{"Accept":["application/json"],"Api_key":["ran*******(14)"],"Content-Type":["application/json"]}`, - "body": `{"name":"pet"}`, + "body": "{\"name\":\"pet\"}\n", }, }) }) @@ -380,7 +380,7 @@ func TestHTTPConnector_authentication(t *testing.T) { res, err := http.Post(fmt.Sprintf("%s/query", testServer.URL), "application/json", bytes.NewBuffer(reqBody)) assert.NilError(t, err) - assert.Equal(t, http.StatusTooManyRequests, res.StatusCode) + assert.Equal(t, http.StatusUnprocessableEntity, res.StatusCode) }) t.Run("encoding-ndjson", func(t *testing.T) {