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

Force input to file in filebeat module tests #8140

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

jsoriano
Copy link
Member

There can be modules that support multiple inputs, currently we only
support module tests with file input so modules whose default input is a
different one fails. This change assumes that a var.input setting is
used to select the input, and sets it to file on tests.

There can be modules that support multiple inputs, currently we only
support module tests with file input so modules whose default input is a
different one fails. This change assumes that a `var.input` setting is
used to select the input, and sets it to file on tests.
@jsoriano
Copy link
Member Author

jsoriano commented Aug 29, 2018

We currently don't have modules using other inputs, but there is one in progress that uses syslog by default (#8014), this is problematic with the test_modules test as it is prepared to work only with files.
In the future we can add support for syslog or other inputs, but I think that this is enough by now to test the module pipeline, it also establishes var.input as the way to select an input when there are several options.
@kvch wdyt?

@kvch
Copy link
Contributor

kvch commented Aug 30, 2018

I agree. As in module tests we only care if Filebeat can read configuration of a module and ES can process correctly the input, file input is sufficient. Reading from network can add unnecessary complexity in this case. We have separate E2E tests for testing inputs of Filebeat.

@jsoriano jsoriano added the needs_backport PR is waiting to be backported to other branches. label Aug 30, 2018
@jsoriano jsoriano merged commit 30ac8e8 into elastic:master Aug 30, 2018
@jsoriano jsoriano deleted the filebeat-test-modules-input-file branch August 30, 2018 13:55
jsoriano added a commit to jsoriano/beats that referenced this pull request Aug 30, 2018
There can be modules that support multiple inputs, currently we only
support module tests with file input so modules whose default input is a
different one fails. This change assumes that a `var.input` setting is
used to select the input, and sets it to file on tests.

(cherry picked from commit 30ac8e8)
@jsoriano jsoriano added v6.5.0 and removed needs_backport PR is waiting to be backported to other branches. labels Aug 30, 2018
jsoriano added a commit that referenced this pull request Aug 30, 2018
There can be modules that support multiple inputs, currently we only
support module tests with file input so modules whose default input is a
different one fails. This change assumes that a `var.input` setting is
used to select the input, and sets it to file on tests.

(cherry picked from commit 30ac8e8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants