elastic / elastic/fleet-server

[Testing] Add high-fidelity integration tests around mock agents + live Kibana API

Open
#3,279 1 comment 0 reactions 0 assignees View on GitHub
Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
113
Forks
117
Avg merge
1d 16h
Merged PRs (30d)
112

Description

Elastic Agent includes a powerful suite of integration tests that spin up Fleet Server and Kibana from snapshot builds to test functionality in a true-to-life environment. We should take cues from this setup and add a similar testing capability to Fleet Server.

## References

- [Elastic Agent test framework developer guide](https://github.com/elastic/elastic-agent/blob/574aa5db629231d56062ab40d27ccceb02cbbe4d/docs/test-framework-dev-guide.md)
- [Elastic Agent integration test directory](https://github.com/elastic/elastic-agent/tree/574aa5db629231d56062ab40d27ccceb02cbbe4d/testing/integration)

One instance where tests like this could've helped us is https://github.com/elastic/fleet-server/issues/3263.

These tests would ideally allow us to place "mock" agents (similar to https://github.com/elastic/horde) into broken or erroneous states intentionally, then run those agents through various APIs and lifecycles to ensure they recover and are placed into a manageable state. Tests like these would allow us to make strides in our fault tolerance and self-healing capabilities around Fleet and Agent.

## Alternatives

- Could we simply expand the existing agent test suite with these capabilities rather than creating a new test infrastructure in Fleet Server?
- Could we use Horde directly, or add additional test coverage in our existing scale/performance test suites to achieve this kind of coverage?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.