nixos/tests/prometheus.exporters.smartctl: init
Starts the exporter, checks it answers via HTTP, checks that it can't detect the device type of the virtual disk.
This commit is contained in:
parent
386a1e79eb
commit
02316a4565
|
@ -1015,6 +1015,25 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
smartctl = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
devices = [
|
||||
"/dev/vda"
|
||||
];
|
||||
};
|
||||
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"'
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
smokeping = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue