You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/13 08:58:08 UTC

[GitHub] [apisix] besich opened a new issue #5053: request help: how to set my plugin path in unittest

besich opened a new issue #5053:
URL: https://github.com/apache/apisix/issues/5053


   ### Issue description
   
   how to set my plugin path in unittest
   in running apisix, it could be setup the `extra_lua_path` and `extra_lua_cpath` in `conf/config.yaml`,
   but in unittest, how to set it?
   ```
   add_block_preprocessor(sub{
       my ($block) = @_;
       my $user_yaml_config = $block->user_yaml_config // <<_EOC_;
   apisix:
     extra_lua_path: "/xxxxxx/apisix/?.lua"
   _EOC_
   
       $block->set_value("yaml_config", $user_yaml_config);
   });
   ```
   it also not found the  lua script.
    
   
   ### Environment
   
   none


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] leslie-tsang commented on issue #5053: request help: how to set my plugin path in unittest

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #5053:
URL: https://github.com/apache/apisix/issues/5053#issuecomment-918331997


   Hi, you can modify it in `t/APISIX.pm`, more detail can be find in [openresty unit test](https://openresty.gitbooks.io/programming-openresty/content/testing/test-modes.html)
   https://github.com/apache/apisix/blob/cd97d827abf6791611ce355b12555531dbd7b53d/t/APISIX.pm#L231-L234


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] dmsolr commented on issue #5053: request help: how to set my plugin path in unittest

Posted by GitBox <gi...@apache.org>.
dmsolr commented on issue #5053:
URL: https://github.com/apache/apisix/issues/5053#issuecomment-918003854


   It does not support yet. You can try to modify lua_package_path in APISIX.pm 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #5053: request help: how to set my plugin path in unittest

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5053:
URL: https://github.com/apache/apisix/issues/5053


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org