monkeyDluffy6017 commented on code in PR #7639: URL: https://github.com/apache/apisix/pull/7639#discussion_r944167885
########## t/plugin/grpc-transcode3.t: ########## @@ -122,3 +122,447 @@ POST /grpctest Content-Type: application/json --- response_body chomp {"message":"Hello world, name: Joe, age: 1, name: Jake, age: 2"} + + + +=== TEST 3: set proto (id: 1, get error response from rpc) +--- config + location /t { + content_by_lua_block { + local t = require("lib.test_admin").test + + local code, body = t('/apisix/admin/proto/1', + ngx.HTTP_PUT, + [[{ + "content" : "syntax = \"proto3\"; + package helloworld; + service Greeter { + rpc GetErrResp (HelloRequest) returns (HelloReply) {} + } + message HelloRequest { + string name = 1; + repeated string items = 2; + } + message HelloReply { + string message = 1; + repeated string items = 2; + } + message ErrorDetail { + int64 code = 1; + string message = 2; + string type = 3; + }" + }]] + ) + + if code >= 300 then + ngx.status = code + end + ngx.say(body) + } + } +--- request +GET /t +--- response_body +passed +--- no_error_log +[error] + + + +=== TEST 4: set routes (id: 1, get error response from rpc) Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org