monkeyDluffy6017 commented on code in PR #10477:
URL: https://github.com/apache/apisix/pull/10477#discussion_r1399960808
##########
t/admin/schema-validate.t:
##########
@@ -398,3 +398,42 @@ location /t {
--- error_code: 400
--- response
{"error_msg":"allOf 1 failed: value should match only one schema, but matches
none"}
+
+
+
+=== TEST 13: Check node_schema optional port
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes',
+ ngx.HTTP_POST,
+ {
+ uri = "/ip",
+ upstream = {
+ type = "roundrobin",
+ nodes = {
+ { host = "nghttp2.org", weight = 1,}
+ }
+ },
+ methods = {"GET"},
+ }
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+
+
+
+=== TEST 14: Test route upstream
+--- request
+GET /ip
Review Comment:
We should check the response body, like this
```
=== TEST 8: `url` exist and `route_id` is 1
--- request
GET /hello
--- response_body
hello world
```
--
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]