test: use the absolute path of $apisix_home instead of ., search the lua source fine in the folder $apisix_home. (#2348)

This commit is contained in:
YuanSheng Wang 2020-10-05 08:42:13 +08:00 committed by GitHub
parent a4e3526049
commit 5d172d606f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
t/APISIX.pm vendored
View File

@ -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;