File: lint.sh

package info (click to toggle)
prometheus-cpp 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 792 kB
  • sloc: cpp: 3,596; sh: 37; makefile: 12
file content (29 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash

set -o errexit
set -o pipefail

curl=$(which curl)
if [ ! -x "$curl" ] ; then
    echo "curl must be in path for this test to run"
    exit 1
fi

promtool=$(which promtool)
if [ ! -x "$promtool" ] ; then
    echo "promtool must be in path for this test to run"
    exit 1
fi

pull/tests/integration/sample-server&
sample_server_pid=$!

function stop_server {
  echo "Stopping sample-server"
  kill -9 $sample_server_pid
}
trap stop_server EXIT

sleep 1

"$curl" -s http://localhost:8080/metrics | "$promtool" check metrics