-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add simplified integration framework #42450
base: main
Are you sure you want to change the base?
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
c9bcb84
to
efd3b0d
Compare
ff707a2
to
dafbfd4
Compare
That can be used for running Beats binaries in integration tests. This framework has a simplified API comparing to the existing one and uses a more efficient way to search for logs in the output of the command.
dafbfd4
to
125a560
Compare
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
That can be used for running Beats binaries in integration tests.
This framework has a simplified API comparing to the existing one and uses a more efficient way to search for logs in the output of the command.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Motivation
Recently I needed to write a few integration tests that run the Filebeat binary and I found the existing integration framework very cumbersome. It requires a lot of boilerplate code and the purpose of any framework is to illuminate that.
Since we're going to eventually migrate all the integration tests written in Python, we need to have a very simple tool for writing integration tests that should cover most of the test-cases.
Both frameworks (old and new) can co-exist for now.
Pros
This design has a few advantages over the previous one:
For example, test similar to the one written in the older framework:
https://github.com/elastic/beats/blob/main/filebeat/tests/integration/filebeat_test.go#L37-L94
Can be replaced with this:
Additionally, it also includes validation that:
Another example, this time we expect Beat to crash:
Cons
Current functionality
Basic Assertions
Filebeat-specific Assertions
Reporting
Config