diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 0a3c508460dad..ba3dc9d92f183 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -193,8 +193,10 @@ TEST_F(HttpRequestTest, Get) { std::string host = absl::StrFormat("localhost:%d", g_server_port); LOG(INFO) << "requesting from " << host; memset(&req, 0, sizeof(req)); - auto uri = grpc_core::URI::Create("http", host, "/get", {} /* query params */, - "" /* fragment */); + auto uri = grpc_core::URI::Create( + "http", host, "/get", + /*query_parameter_pairs=*/{{"foo", "bar"}, {"baz", "quux"}}, + /*fragment=*/""); CHECK(uri.ok()); grpc_core::OrphanablePtr http_request = grpc_core::HttpRequest::Get( @@ -219,8 +221,10 @@ TEST_F(HttpRequestTest, Post) { memset(&req, 0, sizeof(req)); req.body = const_cast("hello"); req.body_length = 5; - auto uri = grpc_core::URI::Create("http", host, "/post", - {} /* query params */, "" /* fragment */); + auto uri = grpc_core::URI::Create( + "http", host, "/post", + /*query_parameter_pairs=*/{{"foo", "bar"}, {"mumble", "frotz"}}, + /*fragment=*/""); CHECK(uri.ok()); grpc_core::OrphanablePtr http_request = grpc_core::HttpRequest::Post( diff --git a/test/core/http/test_server.py b/test/core/http/test_server.py index 6da64fc84e91a..34cb717bcbe19 100755 --- a/test/core/http/test_server.py +++ b/test/core/http/test_server.py @@ -59,13 +59,13 @@ def good(self): ) def do_GET(self): - if self.path == "/get": + if self.path == "/get?foo=bar&baz=quux": self.good() def do_POST(self): content_len = self.headers.get("content-length") content = self.rfile.read(int(content_len)).decode("ascii") - if self.path == "/post" and content == "hello": + if self.path == "/post?foo=bar&mumble=frotz" and content == "hello": self.good()