Skip to content

Commit

Permalink
Increase index pattern size check to 10MiB (#21487)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansr authored Oct 2, 2020
1 parent 7e36f5c commit 30a1415
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libbeat/tests/system/beat/common_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

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:

Expand Down Expand Up @@ -56,7 +62,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."

Expand All @@ -68,7 +74,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."

Expand Down

0 comments on commit 30a1415

Please sign in to comment.