Firstsawyou commented on a change in pull request #2209:
URL: https://github.com/apache/apisix/pull/2209#discussion_r488819427



##########
File path: t/admin/schema.t
##########
@@ -37,10 +37,47 @@ qr/"plugins":\{"type":"object"}/
 
 
 === TEST 2: get service schema
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/schema/service',
+                ngx.HTTP_GET,
+                "",
+                [[{
+                    "anyOf": [
+                        {
+                            "required":[
+                                "upstream"
+                            ]
+                        },
+                        {
+                            "required":[
+                                "upstream_id"
+                            ]
+                        },
+                        {
+                            "required":[
+                                "plugins"
+                            ]
+                        },
+                        {
+                            "required":[
+                                "script"
+                            ]
+                        }
+                    ],
+                    "action": "set"
+                }]]

Review comment:
       The way to detect the removal of "anyOf" is wrong, causing the test to 
fail.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to