papdaniel commented on issue #12056:
URL: https://github.com/apache/apisix/issues/12056#issuecomment-2733113624

   Hello @juzhiyuan!
   As I need a simple modification in ip-restriction plugin I'd just add my 
test cases to `t/plugin/ip-restriction.t`, and to run I'd go with this 
https://github.com/apache/apisix/blob/master/docs/en/latest/build-apisix-dev-environment-on-mac.md
 description which seems quite straightforward with docker. I've done all the 
steps, and tried to run the test file (first without any modification): 
   `docker exec -it apisix-dev-env prove t/plugin/ip-restriction.t`
   I'm getting:
   ```
   t/plugin/ip-restriction.t .. 1/? 
   #   Failed test 'ERROR: client socket timed out - t/plugin/ip-restriction.t 
TEST 1: sanity
   # '
   #   at /usr/local/share/perl/5.30.0/Test/Nginx/Socket.pm line 2206.
   
   #   Failed test 't/plugin/ip-restriction.t TEST 1: sanity - status code ok'
   #   at /usr/local/share/perl/5.30.0/Test/Nginx/Socket.pm line 949.
   #          got: ''
   #     expected: '200'
   
   #   Failed test 't/plugin/ip-restriction.t TEST 1: sanity - response_body - 
response is expected (repeated req 0, req 0)'
   #   at /usr/local/share/perl/5.30.0/Test/Nginx/Socket.pm line 1660.
   #          got: ''
   #     expected: '{"message":"Your IP address is not 
allowed","whitelist":["10.255.254.0/24","192.168.0.0/16"]}
   # '
   ....
   ```


-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to