mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Merge pull request #231870 from teutat3s/zhf/prometheus-exporter-wireguard
nixosTests.prometheus-exporters.wireguard: fix test script
This commit is contained in:
commit
d4028c3eb6
1 changed files with 5 additions and 2 deletions
|
@ -1396,7 +1396,10 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
wireguard = let snakeoil = import ./wireguard/snakeoil-keys.nix; in
|
wireguard = let
|
||||||
|
snakeoil = import ./wireguard/snakeoil-keys.nix;
|
||||||
|
publicKeyWithoutNewlines = replaceStrings [ "\n" ] [ "" ] snakeoil.peer1.publicKey;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
exporterConfig.enable = true;
|
exporterConfig.enable = true;
|
||||||
metricProvider = {
|
metricProvider = {
|
||||||
|
@ -1418,7 +1421,7 @@ let
|
||||||
wait_for_unit("prometheus-wireguard-exporter.service")
|
wait_for_unit("prometheus-wireguard-exporter.service")
|
||||||
wait_for_open_port(9586)
|
wait_for_open_port(9586)
|
||||||
wait_until_succeeds(
|
wait_until_succeeds(
|
||||||
"curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'"
|
"curl -sSf http://localhost:9586/metrics | grep '${publicKeyWithoutNewlines}'"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue