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.
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.