From af405fe8c289db9d1d77b0d418c9453e27870e25 Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Fri, 2 Oct 2020 18:11:27 +0200 Subject: [PATCH 1/2] Increase index pattern size check to 10MiB --- libbeat/tests/system/beat/common_tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libbeat/tests/system/beat/common_tests.py b/libbeat/tests/system/beat/common_tests.py index c9cdbc52cc0f..52aecf637f71 100644 --- a/libbeat/tests/system/beat/common_tests.py +++ b/libbeat/tests/system/beat/common_tests.py @@ -4,6 +4,11 @@ from beat.beat import INTEGRATION_TESTS +# Fail if the exported index pattern is larger than 10MiB +# This is to avoid problems with Kibana when the payload +# of the request to install the index pattern exceeds the +# default limit. +index_pattern_size_limit = 10 * 1024 * 1024 class TestExportsMixin: @@ -56,7 +61,7 @@ def test_export_index_pattern(self): js = json.loads(output) assert "objects" in js size = len(output.encode('utf-8')) - assert size < 1024 * 1024, "Kibana index pattern must be less than 1MiB " \ + assert size < index_pattern_size_limit, "Kibana index pattern must be less than 10MiB " \ "to keep the Beat setup request size below " \ "Kibana's server.maxPayloadBytes." @@ -68,7 +73,7 @@ def test_export_index_pattern_migration(self): js = json.loads(output) assert "objects" in js size = len(output.encode('utf-8')) - assert size < 1024 * 1024, "Kibana index pattern must be less than 1MiB " \ + assert size < index_pattern_size_limit, "Kibana index pattern must be less than 10MiB " \ "to keep the Beat setup request size below " \ "Kibana's server.maxPayloadBytes." From 7d2e38314bfd900c7d4b51a8d003553a38a05624 Mon Sep 17 00:00:00 2001 From: Adrian Serrano Date: Fri, 2 Oct 2020 18:51:37 +0200 Subject: [PATCH 2/2] mage fmt --- libbeat/tests/system/beat/common_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libbeat/tests/system/beat/common_tests.py b/libbeat/tests/system/beat/common_tests.py index 52aecf637f71..920ee35e72e2 100644 --- a/libbeat/tests/system/beat/common_tests.py +++ b/libbeat/tests/system/beat/common_tests.py @@ -10,6 +10,7 @@ # default limit. index_pattern_size_limit = 10 * 1024 * 1024 + class TestExportsMixin: def run_export_cmd(self, cmd, extra=[]):