[fix](ut)fix be enable_http_auth ut (#40071) (#40088)

bp #40071 

## Proposed changes
before pr #39577
This commit is contained in:
daidai
2024-08-29 16:42:53 +08:00
committed by GitHub
parent 51e8d9174d
commit ac8cff34ce

View File

@ -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);