grapestore commented on PR #12759:
URL: https://github.com/apache/apisix/pull/12759#issuecomment-3644987456

   @membphis 
   
   Here is a real scenario:
   
   We use the official APISIX Docker image while developing custom plugins.
   The custom plugin directory is mounted into the container, and in tests we 
add that directory to extra_lua_path so the plugin can be loaded.
   
   Example:
   
   Mount local custom plugins to /usr/local/apisix/custom/plugins
   In the test:
   apisix.extra_lua_path: "/usr/local/apisix/custom/plugins/?.lua"
   The issue is that the test framework does not prepend this extra_lua_path to 
lua_package_path.
   As a result, during tests the custom plugin path is not included in 
package.path, and require fails to load the plugin.
   This works correctly in a real APISIX runtime, but the test environment 
cannot see the plugin, causing inconsistent behavior.
   
   This scenario clearly shows the problem where extra_lua_path is not applied 
in the test framework.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to