Skip to content

Writing tests for custom plugins, using "extra_lua_path" #11369

Closed Answered by mikyll
mikyll asked this question in Q&A
Discussion options

You must be logged in to vote

Just found out why: APISIX.pm line 258

this makes extra_lua_path parameter in config.yaml useless 👀

As a simple workaround, I just moved the extra path from config.yaml file to the end of lua_package_path variable:

    lua_package_path "$apisix_home/?.lua;$apisix_home/?/init.lua;$apisix_home/deps/share/lua/5.1/?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;$apisix_home/t/xrpc/?.lua;$apisix_home/t/xrpc/?/init.lua;/home/apisix/apisix_src/apisix/plugins/custom/?.lua;;";

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mikyll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant