mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
services.prometheus.exporters.fastly: add a smoke test
This commit is contained in:
parent
d3aee09b99
commit
3907d19260
|
@ -33,7 +33,7 @@ in
|
|||
${optionalString (cfg.tokenPath != null)
|
||||
"export FASTLY_API_TOKEN=$(cat ${toString cfg.tokenPath})"}
|
||||
${pkgs.prometheus-fastly-exporter}/bin/fastly-exporter \
|
||||
-endpoint http://${cfg.listenAddress}:${toString cfg.port}/metrics
|
||||
-listen http://${cfg.listenAddress}:${toString cfg.port}
|
||||
${optionalString cfg.debug "-debug true"} \
|
||||
${optionalString (cfg.configFile != null) "-config-file ${cfg.configFile}"}
|
||||
'';
|
||||
|
|
|
@ -259,6 +259,19 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
fastly = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
tokenPath = pkgs.writeText "token" "abc123";
|
||||
};
|
||||
|
||||
# noop: fastly's exporter can't start without first talking to fastly
|
||||
# see: https://github.com/peterbourgon/fastly-exporter/issues/87
|
||||
exporterTest = ''
|
||||
succeed("true");
|
||||
'';
|
||||
};
|
||||
|
||||
fritzbox = {
|
||||
# TODO add proper test case
|
||||
exporterConfig = {
|
||||
|
|
Loading…
Reference in a new issue