prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
Loading...
Searching...
No Matches
test_prometheus_cpp_integration.cpp File Reference

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>
Include dependency graph for test_prometheus_cpp_integration.cpp:

Detailed Description

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.