This repo contains a set of tests to check compliance with the Prometheus Remote Write 1.0 specification for senders.
The test suit works by forking an instance of the sender with some config to scrape the test running itself and send remote write requests to the test suite for a fixed period of time. The test suit than examines the received requests for compliance.
The test is a vanilla Golang unit test, and can be run as such. To run all the tests:
$ go test --tags=compliance -v ./
To run all the tests for a single target:
$ go test --tags=compliance -run "TestRemoteWrite/prometheus/.+" -v ./
To run a single test across all the targets:
$ go test --tags=compliance -run "TestRemoteWrite/.+/Counter" -v ./
The repo tests the following remote write senders:
- Prometheus itself.
- The Grafana Agent.
- InfluxData's Telegraf.
- The OpenTelemetry Collector.
- The VictoriaMetrics Agent, unless you're on Mac OS X.
- Timber.io Vector.
If you want to test a dev version of your sender, simply put your binary in bin/
.
To add another sender, see the examples in the targets director and recreate that pattern in a PR.