mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
nixosTests.prometheus-exporters.wireguard: fix test script
A newline in the public key breaks the test script, stripping it out fixes the test.
This commit is contained in:
parent
897876e4c4
commit
b3915bd5e2
@ -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;
|
||||
metricProvider = {
|
||||
@ -1418,7 +1421,7 @@ let
|
||||
wait_for_unit("prometheus-wireguard-exporter.service")
|
||||
wait_for_open_port(9586)
|
||||
wait_until_succeeds(
|
||||
"curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'"
|
||||
"curl -sSf http://localhost:9586/metrics | grep '${publicKeyWithoutNewlines}'"
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user