Skip to content

Commit

Permalink
test: Add tests for API requests metrics
Browse files Browse the repository at this point in the history
Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Jul 30, 2024
1 parent f6d34fd commit 4b6cca7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/suites/metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ test_metrics() {
curl -k -s -X GET "https://${metrics_addr}/1.0/metrics" | grep "lxd_filesystem_avail_bytes" | grep "type=\"container\""
curl -k -s -X GET "https://${metrics_addr}/1.0/metrics?project=default" | grep "lxd_filesystem_avail_bytes" | grep "type=\"container\""

# API requests metrics should be included
curl -k -s -X GET "https://${metrics_addr}/1.0/metrics" | grep "lxd_api_requests_completed_total" | grep "entity_type=\"server\""
curl -k -s -X GET "https://${metrics_addr}/1.0/metrics" | grep "lxd_api_requests_completed_total" | grep "status=\"succeeded\""
curl -k -s -X GET "https://${metrics_addr}/1.0/metrics" | grep "lxd_api_requests_ongoing" | grep "entity_type=\"server\""

lxc delete -f c1 c2
lxc delete -f c3 --project foo
lxc delete -f c4 --project foo2
Expand Down

0 comments on commit 4b6cca7

Please sign in to comment.