#!/bin/sh
#
# This is a functional test which passes if prometheus-varnish-exporter returns
# the metric 'varnish_up' with the value 1. This means that:
# - prometheus-varnish-exporter.service has been started correctly
# - the exporter can run varnishstat(1) successfully
# - metrics are being returned as expected

set -e pipefail

curl -s 127.0.0.1:9131/metrics | grep -q '^varnish_up 1$'
