monkeyDluffy6017 commented on code in PR #7639:
URL: https://github.com/apache/apisix/pull/7639#discussion_r944170147
##########
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
Review Comment:
What do you mean? section 3 should be merge into section 1, or section 3
should be after section 1?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]