spacewander commented on code in PR #8180:
URL: https://github.com/apache/apisix/pull/8180#discussion_r1008842971
##########
t/admin/upstream.t:
##########
@@ -727,3 +727,48 @@ GET /t
{"error_msg":"failed to fetch ssl info by ssl id [1], wrong ssl type"}
--- no_error_log
[error]
+
+
+
+=== TEST 22: type with default vale
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local etcd = require("apisix.core.etcd")
+ local code, body = t('/apisix/admin/upstreams/admin_up',
+ ngx.HTTP_PUT,
+ [[{
+ "nodes": {
+ "127.0.0.1:8080": 1
+ },
+ "desc": "new upstream"
+ }]],
+ [[{
+ "value": {
+ "nodes": {
+ "127.0.0.1:8080": 1
+ },
+ "type": "roundrobin",
+ "desc": "new upstream"
+ },
+ "key": "/apisix/upstreams/admin_up"
+ }]]
+ )
+
+ ngx.status = code
+ ngx.say(body)
+
+ local res = assert(etcd.get('/upstreams/admin_up'))
+ local create_time = res.body.node.value.create_time
Review Comment:
We don't need to check xxx_time, right?
--
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]