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/11/28 03:10:17 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #5625: docs: exec code block for shell commands in Test Nginx

spacewander commented on a change in pull request #5625:
URL: https://github.com/apache/apisix/pull/5625#discussion_r757836595



##########
File path: docs/en/latest/internal/testing-framework.md
##########
@@ -286,3 +286,24 @@ ONLY:
 --- response_body
 {"action":"get","count":0,"node":{"dir":true,"key":"/apisix/upstreams","nodes":{}}}
 ```
+
+### Executing Shell Commands
+
+It is possible to execute shell commands while writing tests in Test Nginx for apisix modules. We exeposes this feature via `exec` code block. The `stdout` of the executed process can be captured via `response_body` code block and `stderr` (if any) can be captured by filtering error.log through `grep_error_log`. Here is an example:

Review comment:
       ```suggestion
   It is possible to execute shell commands while writing tests in test-nginx for APISIX. We expose this feature via `exec` code block. The `stdout` of the executed process can be captured via `response_body` code block and `stderr` (if any) can be captured by filtering error.log through `grep_error_log`. Here is an example:
   ```




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