mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
nixos/tests/elk.nix: make sure the test doesn't wait for too long on elasticsearch-curator
This commit is contained in:
parent
8aa3318741
commit
241377ee76
@ -72,7 +72,7 @@ let
|
|||||||
1:
|
1:
|
||||||
action: delete_indices
|
action: delete_indices
|
||||||
description: >-
|
description: >-
|
||||||
Delete indices older than 1 minute (based on index name), for logstash-
|
Delete indices older than 1 second (based on index name), for logstash-
|
||||||
prefixed indices. Ignore the error if the filter does not result in an
|
prefixed indices. Ignore the error if the filter does not result in an
|
||||||
actionable list of indices (ignore_empty_list) and exit cleanly.
|
actionable list of indices (ignore_empty_list) and exit cleanly.
|
||||||
options:
|
options:
|
||||||
@ -86,7 +86,7 @@ let
|
|||||||
source: name
|
source: name
|
||||||
direction: older
|
direction: older
|
||||||
timestring: '%Y.%m.%d'
|
timestring: '%Y.%m.%d'
|
||||||
unit: minutes
|
unit: seconds
|
||||||
unit_count: 1
|
unit_count: 1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -118,6 +118,8 @@ let
|
|||||||
# See if logstash messages arive in elasticsearch.
|
# See if logstash messages arive in elasticsearch.
|
||||||
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"flowers\"}}}' | jq .hits.total | grep -v 0");
|
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"flowers\"}}}' | jq .hits.total | grep -v 0");
|
||||||
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"dragons\"}}}' | jq .hits.total | grep 0");
|
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"dragons\"}}}' | jq .hits.total | grep 0");
|
||||||
|
|
||||||
|
# Test elasticsearch-curator.
|
||||||
$one->systemctl("stop logstash");
|
$one->systemctl("stop logstash");
|
||||||
$one->systemctl("start elasticsearch-curator");
|
$one->systemctl("start elasticsearch-curator");
|
||||||
$one->waitUntilSucceeds("! curl --silent --show-error '${esUrl}/_cat/indices' | grep logstash | grep -q ^$1");
|
$one->waitUntilSucceeds("! curl --silent --show-error '${esUrl}/_cat/indices' | grep logstash | grep -q ^$1");
|
||||||
|
Loading…
Reference in New Issue
Block a user