From ac8cff34ce1b5d563cb646c7d640dfadfce51cf0 Mon Sep 17 00:00:00 2001 From: daidai <2017501503@qq.com> Date: Thu, 29 Aug 2024 16:42:53 +0800 Subject: [PATCH] [fix](ut)fix be enable_http_auth ut (#40071) (#40088) bp #40071 ## Proposed changes before pr #39577 --- be/test/http/http_auth_test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/be/test/http/http_auth_test.cpp b/be/test/http/http_auth_test.cpp index 6077f871b7..f39e61aa6e 100644 --- a/be/test/http/http_auth_test.cpp +++ b/be/test/http/http_auth_test.cpp @@ -73,8 +73,7 @@ TEST_F(HttpAuthTest, enable_all_http_auth) { { auto evhttp_req = evhttp_request_new(nullptr, nullptr); HttpRequest req2(evhttp_req); - auto auth = encode_basic_auth("doris", "passwd"); - req2._headers.emplace(HttpHeaders::AUTHORIZATION, auth); + req2._headers.emplace(HttpHeaders::AUTHORIZATION, "Basic cm9vdDo="); EXPECT_EQ(s_auth_handler.on_header(&req2), -1); } @@ -82,8 +81,7 @@ TEST_F(HttpAuthTest, enable_all_http_auth) { { auto evhttp_req = evhttp_request_new(nullptr, nullptr); HttpRequest req3(evhttp_req); - auto auth = encode_basic_auth("doris", "passwd"); - req3._headers.emplace(HttpHeaders::AUTHORIZATION, auth); + req3._headers.emplace(HttpHeaders::AUTHORIZATION, "Basic cm9vdDo="); req3._params.emplace("table", "T"); EXPECT_EQ(s_auth_handler.on_header(&req3), 0); evhttp_request_free(evhttp_req);