|
prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
|
HTTP-level integration test for the prometheus-cpp backend. More...
#include <prom/prometheus_cpp/adapter.hpp>#include <prom/registry.hpp>#include <gtest/gtest.h>#include <prometheus/exposer.h>#include <prometheus/registry.h>
HTTP-level integration test for the prometheus-cpp backend.
Records metrics through prom's client-independent API, serves them from a real prometheus::Exposer (the Civetweb-backed pull endpoint a host application uses), then scrapes /metrics over an actual TCP/HTTP round trip and asserts the exposition text came back intact. Unlike the in-process serializer tests, this exercises the full pull path end to end over a socket.
POSIX sockets only (the CI matrix is Linux + macOS); guarded accordingly so the file is simply skipped elsewhere.