-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filebeat] Add export tests to x-pack/filebeat (#20156)
* Add export tests to x-pack/filebeat Add export sub-command tests to x-pack/filebeat and add an assertion for the size the Kibana index-pattern due to the Kibana API limiting payloads to 1 MiB. * Assert size of index pattern document is less than 1 MiB
- Loading branch information
1 parent
ea63f05
commit 36c8468
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import jinja2 | ||
import os | ||
import sys | ||
|
||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../filebeat/tests/system'))) | ||
|
||
from filebeat import BaseTest as FilebeatTest | ||
from beat import common_tests | ||
|
||
|
||
class FilebeatXPackTest(FilebeatTest, common_tests.TestExportsMixin): | ||
|
||
@classmethod | ||
def setUpClass(self): | ||
self.beat_name = "filebeat" | ||
self.beat_path = os.path.abspath( | ||
os.path.join(os.path.dirname(__file__), "../../")) | ||
|
||
super(FilebeatTest, self).setUpClass() | ||
|
||
def setUp(self): | ||
super(FilebeatTest, self).setUp() | ||
|
||
# Hack to make jinja2 have the right paths | ||
self.template_env = jinja2.Environment( | ||
loader=jinja2.FileSystemLoader([ | ||
os.path.abspath(os.path.join(self.beat_path, "../../filebeat")), | ||
os.path.abspath(os.path.join(self.beat_path, "../../libbeat")) | ||
]) | ||
) |