This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new ecb04f3 test: make control/discovery.t stable (#3817)
ecb04f3 is described below
commit ecb04f380f9a1ff23bd7831e9470a5cedb96fc93
Author: 罗泽轩 <[email protected]>
AuthorDate: Mon Mar 15 09:13:20 2021 +0800
test: make control/discovery.t stable (#3817)
---
t/control/discovery.t | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/t/control/discovery.t b/t/control/discovery.t
index c9a4ed2..e16db43 100644
--- a/t/control/discovery.t
+++ b/t/control/discovery.t
@@ -88,16 +88,33 @@ GET /t
local t = require("lib.test_admin")
local code, body, res = t.test('/v1/discovery/eureka/dump',
- ngx.HTTP_GET)
- local entity = json.decode(res)
- ngx.say(json.encode(entity))
+ ngx.HTTP_GET, nil,
+ [[{
+ "config": {
+ "fetch_interval": 10,
+ "host": [
+ "http://127.0.0.1:8761"
+ ],
+ "prefix": "/eureka/",
+ "timeout": {
+ "connect": 1500,
+ "read": 1500,
+ "send": 1500
+ },
+ "weight": 80
+ },
+ "services": {}
+ }]]
+ )
+ ngx.satus = code
+ ngx.say(body)
}
}
--- request
GET /t
--- error_code: 200
--- response_body
-{"config":{"fetch_interval":10,"host":["http://127.0.0.1:8761"],"prefix":"/eureka/","timeout":{"connect":1500,"read":1500,"send":1500},"weight":80},"services":{}}
+passed