Enable elasticsearch-curator on elasticsearch 7
The current nixpkgs use elasticsearch-curator 5.8.1. As of version 5.7.0, elasticsearch-curator supports elasticsearch 7, thus this change enables tests with ES 7.
This commit is contained in:
parent
b0b37569a7
commit
900e288d22
|
@ -10,8 +10,7 @@ let
|
||||||
esUrl = "http://localhost:9200";
|
esUrl = "http://localhost:9200";
|
||||||
|
|
||||||
mkElkTest = name : elk :
|
mkElkTest = name : elk :
|
||||||
let elasticsearchGe7 = builtins.compareVersions elk.elasticsearch.version "7" >= 0;
|
import ./make-test-python.nix ({
|
||||||
in import ./make-test-python.nix ({
|
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco offline basvandijk ];
|
maintainers = [ eelco offline basvandijk ];
|
||||||
|
@ -91,8 +90,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
elasticsearch-curator = {
|
elasticsearch-curator = {
|
||||||
# The current version of curator (5.6) doesn't support elasticsearch >= 7.0.0.
|
enable = true;
|
||||||
enable = !elasticsearchGe7;
|
|
||||||
actionYAML = ''
|
actionYAML = ''
|
||||||
---
|
---
|
||||||
actions:
|
actions:
|
||||||
|
@ -173,7 +171,7 @@ let
|
||||||
one.wait_until_succeeds(
|
one.wait_until_succeeds(
|
||||||
total_hits("Supercalifragilisticexpialidocious") + " | grep -v 0"
|
total_hits("Supercalifragilisticexpialidocious") + " | grep -v 0"
|
||||||
)
|
)
|
||||||
'' + pkgs.lib.optionalString (!elasticsearchGe7) ''
|
|
||||||
with subtest("Elasticsearch-curator works"):
|
with subtest("Elasticsearch-curator works"):
|
||||||
one.systemctl("stop logstash")
|
one.systemctl("stop logstash")
|
||||||
one.systemctl("start elasticsearch-curator")
|
one.systemctl("start elasticsearch-curator")
|
||||||
|
|
Loading…
Reference in a new issue