You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/11/15 11:37:01 UTC
[apisix] branch master updated: test: write the config.yaml
according to the profile (#2736)
This is an automated email from the ASF dual-hosted git repository.
membphis 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 0654687 test: write the config.yaml according to the profile (#2736)
0654687 is described below
commit 0654687aed678cceaaa1982df9c8b63f65e1b703
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Sun Nov 15 19:36:53 2020 +0800
test: write the config.yaml according to the profile (#2736)
---
t/lib/test_admin.lua | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/t/lib/test_admin.lua b/t/lib/test_admin.lua
index 7f7f017..8800361 100644
--- a/t/lib/test_admin.lua
+++ b/t/lib/test_admin.lua
@@ -131,7 +131,15 @@ end
function _M.set_config_yaml(data)
- local f = assert(io.open(os.getenv("TEST_NGINX_HTML_DIR") .. "/../conf/config.yaml", 'w'))
+ local fn
+ local profile = os.getenv("APISIX_PROFILE")
+ if profile then
+ fn = "config-" .. profile .. ".yaml"
+ else
+ fn = "config.yaml"
+ end
+
+ local f = assert(io.open(os.getenv("TEST_NGINX_HTML_DIR") .. "/../conf/" .. fn, 'w'))
assert(f:write(data))
f:close()
end