AlinsRan commented on code in PR #13878:
URL: https://github.com/apache/apisix/pull/13878#discussion_r3870051631
##########
t/cli/test_stream_config.sh:
##########
@@ -30,34 +30,48 @@ apisix:
make init
+# Two, not one: the stream subsystem has no server of its own to export metrics
+# from, so an http{} block is rendered to host the prometheus export server.
count=$(grep -c "lua_package_path" conf/nginx.conf)
-if [ "$count" -ne 1 ]; then
+if [ "$count" -ne 2 ]; then
Review Comment:
Correct, thanks — fixed in e81e3bff.
The exporter `http{}` is inside the `{% if use_apisix_base then %}` that
opens at ngx_tpl.lua:70 and closes at :135, and this file has no
`exit_if_not_customed_nginx` because everything else in it is runtime
independent. So the count is what is now conditional:
```sh
expected_package_path=1
if openresty -V 2>&1 | grep apisix-nginx-module > /dev/null; then
expected_package_path=2
fi
```
Same detection `exit_if_not_customed_nginx` uses. The other two assertions
in that case (`apisix.http_access_phase` absent, and the `enable_export_server:
false` case expecting one) hold in both runtimes already.
--
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]