Skip to content

Commit

Permalink
Cherry-pick #10443 to 6.x: Allow testing of specific filesets (#10464)
Browse files Browse the repository at this point in the history
Cherry-pick of PR #10443 to 6.x branch. Original message: 

Currently, Filebeat system tests can be filtered to run only on specific modules by specifying the `TESTING_FILEBEAT_MODULES` environment variable. This PR teaches the system tests to also understand an optional `TESTING_FILEBEAT_FILESETS` environment variable, that can be used to run system tests only on specific filesets.
  • Loading branch information
ycombinator authored Feb 1, 2019
1 parent 7f2ab44 commit 329ce20
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion filebeat/tests/system/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def load_fileset_test_cases():
else:
modules = os.listdir(modules_dir)

filesets_env = os.getenv("TESTING_FILEBEAT_FILESETS")

test_cases = []

for module in modules:
Expand All @@ -35,7 +37,12 @@ def load_fileset_test_cases():
if not os.path.isdir(path):
continue

for fileset in os.listdir(path):
if filesets_env:
filesets = filesets_env.split(",")
else:
filesets = os.listdir(path)

for fileset in filesets:
if not os.path.isdir(os.path.join(path, fileset)):
continue

Expand Down

0 comments on commit 329ce20

Please sign in to comment.