soulbird commented on code in PR #7412:
URL: https://github.com/apache/apisix/pull/7412#discussion_r921727002
##########
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:
Looks like we don't need this test case anymore?
--
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]