tests/prometheus-exporters: add new Tor exporter

This new exporter was added in #48307.
This commit is contained in:
Pierre Bourdon 2018-10-13 23:42:28 +02:00 committed by Austin Seipp
parent 9ab8920235
commit 01d1f77681

View File

@ -243,6 +243,25 @@ let
'';
};
tor = {
exporterConfig = {
enable = true;
};
metricProvider = {
# Note: this does not connect the test environment to the Tor network.
# Client, relay, bridge or exit connectivity are disabled by default.
services.tor.enable = true;
services.tor.controlPort = 9051;
};
exporterTest = ''
waitForUnit("tor.service");
waitForOpenPort(9051);
waitForUnit("prometheus-tor-exporter.service");
waitForOpenPort(9130);
succeed("curl -sSf localhost:9130/metrics | grep -q 'tor_version{.\\+} 1'");
'';
};
varnish = {
exporterConfig = {
enable = true;