From e254f0d8b59745db00c8171e6e9f7413c68b0584 Mon Sep 17 00:00:00 2001
From: Jakub Sztandera <kubuxu@protonmail.ch>
Date: Tue, 18 Oct 2016 09:01:00 +0200
Subject: [PATCH] test: check if metrics work in sharness

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
---
 test/sharness/t0600-issues-and-regressions-online.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/sharness/t0600-issues-and-regressions-online.sh b/test/sharness/t0600-issues-and-regressions-online.sh
index ca95514b8..7499b0e1d 100755
--- a/test/sharness/t0600-issues-and-regressions-online.sh
+++ b/test/sharness/t0600-issues-and-regressions-online.sh
@@ -27,6 +27,12 @@ test_expect_success "no panic traces on daemon" '
 	test_must_fail grep "nil pointer dereference" daemon_err
 '
 
+test_expect_success "metrics work" '
+	curl "$API_ADDR/debug/metrics/prometheus" > pro_data &&
+	grep "ipfs_bs_cache_arc_hits_total" < pro_data ||
+	test_fsh cat pro_data
+'
+
 test_kill_ipfs_daemon
 
 test_expect_success "ipfs daemon --offline --mount fails - #2995" '
-- 
GitLab