spacewander commented on code in PR #7639:
URL: https://github.com/apache/apisix/pull/7639#discussion_r946257652


##########
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:
   `--- request` is set in 
https://github.com/apache/apisix/blob/c4d5f2fca5b9ef98b551c769e2b1565185ed9630/t/plugin/grpc-transcode3.t#L27.
 There is no need to set it again.



-- 
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

Reply via email to