Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase index pattern size check to 10MiB #21487

Merged
merged 2 commits into from
Oct 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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