tzssangglass commented on code in PR #7412: URL: https://github.com/apache/apisix/pull/7412#discussion_r921849211
########## t/plugin/prometheus.t: ########## @@ -632,3 +632,53 @@ GET /apisix/prometheus/metrics qr/apisix_/ --- response_body_unlike eval qr/etcd/ + + + +=== TEST 42: fetch the prometheus one shared dict data storage with string +--- yaml_config +nginx_config: + http: + lua_shared_dict: + internal-status: 10m +--- request +GET /apisix/prometheus/metrics +--- response_body_like eval +qr/.*apisix_shared_dict_capacity_bytes{name="internal-status"} \d+(?:.|\n)* +apisix_shared_dict_free_space_bytes{name="internal-status"} \d+.*/ + + + +=== TEST 43: fetch the prometheus multiple shared dict data +--- yaml_config +nginx_config: + http: + lua_shared_dict: + worker-events: 10m + upstream-healthcheck: 10m + internal-status: 10m +--- request eval +["GET /apisix/prometheus/metrics", "GET /apisix/prometheus/metrics", "GET /apisix/prometheus/metrics"] +--- response_body_like eval +[qr/.*apisix_shared_dict_capacity_bytes{name="worker-events"} \d+(?:.|\n)* +apisix_shared_dict_free_space_bytes{name="worker-events"} \d+.*/, +qr/.*apisix_shared_dict_capacity_bytes{name="upstream-healthcheck"} \d+(?:.|\n)* +apisix_shared_dict_free_space_bytes{name="upstream-healthcheck"} \d+.*/, +qr/.*apisix_shared_dict_capacity_bytes{name="internal-status"} \d+(?:.|\n)* +apisix_shared_dict_free_space_bytes{name="internal-status"} \d+.*/] + + + +=== TEST 44: fetch the prometheus multiple shared dict data contain not exist shared dict +--- yaml_config Review Comment: I think this is just another way of describing the correctness of the returned data -- 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