From 5d172d606f4debd0034b8061b5865d46738d47ac Mon Sep 17 00:00:00 2001 From: YuanSheng Wang Date: Mon, 5 Oct 2020 08:42:13 +0800 Subject: [PATCH] test: use the absolute path of `$apisix_home` instead of `.`, search the lua source fine in the folder `$apisix_home`. (#2348) --- t/APISIX.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/APISIX.pm b/t/APISIX.pm index c951cd94..7d90a9b7 100644 --- a/t/APISIX.pm +++ b/t/APISIX.pm @@ -141,8 +141,8 @@ _EOC_ my $stream_enable = $block->stream_enable; my $stream_config = $block->stream_config // <<_EOC_; - lua_package_path "./?.lua;./?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; - lua_package_cpath "./?.so;$apisix_home/deps/lib/lua/5.1/?.so;$apisix_home/deps/lib64/lua/5.1/?.so;;"; + lua_package_path "$apisix_home/?.lua;$apisix_home/?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; + lua_package_cpath "$apisix_home/?.so;$apisix_home/deps/lib/lua/5.1/?.so;$apisix_home/deps/lib64/lua/5.1/?.so;;"; lua_socket_log_errors off; @@ -222,8 +222,8 @@ _EOC_ my $http_config = $block->http_config // ''; $http_config .= <<_EOC_; - lua_package_path "./?.lua;./?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; - lua_package_cpath "./?.so;$apisix_home/deps/lib/lua/5.1/?.so;$apisix_home/deps/lib64/lua/5.1/?.so;;"; + lua_package_path "$apisix_home/?.lua;$apisix_home/?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; + lua_package_cpath "$apisix_home/?.so;$apisix_home/deps/lib/lua/5.1/?.so;$apisix_home/deps/lib64/lua/5.1/?.so;;"; lua_shared_dict plugin-limit-req 10m; lua_shared_dict plugin-limit-count 10m;