prometheus: Add a new test, with --prometheus-listen

Also: rename t9 to prometheus-1

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2017-02-08 23:12:19 +01:00
parent 806d4660cf
commit 7b7c765d78
2 changed files with 16 additions and 0 deletions

16
test/shell/prometheus-2.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash -e
# run empty graph, with prometheus support
timeout --kill-after=20s 15s ./mgmt run --tmp-prefix --prometheus --prometheus-listen :52637 &
pid=$!
sleep 5s # let it converge
# Check that etcd metrics are loaded
curl 127.0.0.1:52637/metrics | grep "^etcd_server_has_leader 1"
# Check that go metrics are loaded
curl 127.0.0.1:52637/metrics | grep "^go_goroutines [0-9]\+"
killall -SIGINT mgmt # send ^C to exit mgmt
wait $pid # get exit status
exit $?