-
Notifications
You must be signed in to change notification settings - Fork 145
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
V2: Add integration tests for the agent v2 control protocol #1275
Comments
Relates to #56 |
We can use #1068 as prior art for how to set this up. That approach uses containers, but we do not necessarily need containers for these tests. We could just start and control the binaries directly. |
This may overlap with #1272 in terms of deciding how the integration tests will be setup and run. |
Much of this is already unit tested in https://github.com/elastic/elastic-agent/blob/feature-arch-v2/pkg/component/runtime/manager_test.go. I am going to re-scope this to just writing integration tests using the agent process for a few key scenarios, with most of the coverage living in the existing manager tests. |
@cmacknz this task was a tech def, can we consider this as done and ready to be worked on? |
Technical definition complete, added to sprint 2. |
This was completed, the unit tests communicate with a real binary over the real GRPC protocol. |
There is an extensive set of unit tests for the control protocol defined in https://github.com/elastic/elastic-agent/blob/feature-arch-v2/pkg/component/runtime/manager_test.go that use a fake input interacting directly with the agent manager. These provide good coverage for the component and unit state transitions but bypass several layers of the agent (notably the gRPC server) that are involved in running a real input.
To ensure we have no gaps in our test coverage we we should implement integration tests of the v2 control protocol using a fake input binary communicating with the compiled agent binary. We should try to cover the test cases below, which include a basic functional test of an input in normal operation and several important error cases.
The text was updated successfully, but these errors were encountered: