2019-05-13 14:28:54 +08:00
|
|
|
use t::APISix 'no_plan';
|
2019-04-11 16:53:21 +08:00
|
|
|
|
2019-05-06 16:02:28 +08:00
|
|
|
repeat_each(2);
|
2019-06-13 12:01:36 +08:00
|
|
|
no_root_location();
|
2019-04-11 16:53:21 +08:00
|
|
|
|
|
|
|
run_tests;
|
|
|
|
|
|
|
|
__DATA__
|
|
|
|
|
|
|
|
=== TEST 1: sanity
|
|
|
|
--- config
|
|
|
|
location /t {
|
|
|
|
content_by_lua_block {
|
|
|
|
local encode_json = require "cjson.safe" .encode
|
2019-05-22 09:19:25 +08:00
|
|
|
local config = require("apisix.core").config.local_conf()
|
2019-05-06 10:14:39 +08:00
|
|
|
|
2019-04-11 16:53:21 +08:00
|
|
|
ngx.say("etcd host: ", config.etcd.host)
|
2019-05-08 10:38:45 +08:00
|
|
|
ngx.say("first plugin: ", encode_json(config.plugins[1]))
|
2019-04-11 16:53:21 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
--- request
|
|
|
|
GET /t
|
|
|
|
--- response_body
|
|
|
|
etcd host: http://127.0.0.1:2379
|
2019-05-08 10:38:45 +08:00
|
|
|
first plugin: "example-plugin"
|