nixos/tests/prometheus-exporters.smartctl: update test script

We can't actually get metrics for a virtual disk drive so the exporter
fails to start with 0.9.x.

Instead let's just make sure it said that /dev/vda was unavailable.
This commit is contained in:
Martin Weinelt 2022-12-09 01:38:22 +01:00
parent fdcc9e8202
commit c7fbae1289
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1086,13 +1086,8 @@ let
];
};
exporterTest = ''
wait_for_unit("prometheus-smartctl-exporter.service")
wait_for_open_port(9633)
wait_until_succeeds(
"curl -sSf 'localhost:9633/metrics'"
)
wait_until_succeeds(
'journalctl -eu prometheus-smartctl-exporter.service -o cat | grep "/dev/vda: Unable to detect device type"'
'journalctl -eu prometheus-smartctl-exporter.service -o cat | grep "Device unavailable"'
)
'';
};