biakecw commented on code in PR #8219:
URL: https://github.com/apache/apisix/pull/8219#discussion_r1020063052


##########
t/admin/stream-routes.t:
##########
@@ -639,3 +639,48 @@ passed
 {"error_msg":"property \"faults\" validation failed: wrong type: expected 
array, got string"}
 --- no_error_log
 [error]
+
+
+
+=== TEST 17:  put reference route +  delete
+--- extra_yaml_config
+xrpc:
+  protocols:
+    - name: pingpong
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/stream_routes/12',
+                ngx.HTTP_PUT,
+                [[{
+                    "remote_addr": "127.0.0.1",
+                    "desc": "test-refer",
+                    "upstream": {
+                        "nodes": {
+                            "127.0.0.1:8080": 1
+                        },
+                        "type": "roundrobin"
+                    },
+                    "protocol": {
+                        "name": "pingpong",
+                        "superior_id": "1"
+                    }
+                }]]
+                )
+            if code > 300 then
+                ngx.status = code
+                ngx.print(body)
+                return
+            end
+
+            code2, message = t('/apisix/admin/stream_routes/1', 
ngx.HTTP_DELETE)

Review Comment:
   ok, I will revise



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

Reply via email to