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

Add automated test coverage for service based components #1357

Closed
Tracked by #2428
cmacknz opened this issue Sep 28, 2022 · 4 comments
Closed
Tracked by #2428

Add automated test coverage for service based components #1357

cmacknz opened this issue Sep 28, 2022 · 4 comments
Labels

Comments

@cmacknz
Copy link
Member

cmacknz commented Sep 28, 2022

This work pairs with #1069 and the implementation PR #1087 to add support from running agent components as separate services.

Currently we only have unit test coverage for this functionality, but considering the importance and cross-platform nature of the feature we should also add integration or end to end tests ensuring the agent binary can start, supervise, and stop services on each major operating system. We should also try to test situations likely to cause problems: killing either the agent or the service it is supervising unexpectedly, uninstalling the agent service, uninstalling the supervised service, upgrading the agent with a supervised service, interrupting the upgrade, etc.

The simplest way to test this is to allow downloading the endpoint-security binary and adding it to the components directory when a service integration test is run (PR discussion.

@cmacknz
Copy link
Member Author

cmacknz commented Sep 29, 2022

There appears to be an existing E2E test suite that installs endpoint security we could try to revive: https://github.com/elastic/e2e-testing/blob/main/e2e/_suites/fleet/features/endpoint_integration.feature

We could also consider using a trivial stub service that is guaranteed to always be well behaved so we don't have to debug endpoint failures in the tests. As an E2E test though, catching problems with endpoint is probably valuable considering the entire service management feature exists just for endpoint.

@jlind23 jlind23 added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 3, 2022
@cmacknz cmacknz changed the title V2: Add automated test coverage for service based components Add automated test coverage for service based components Jun 13, 2023
@cmacknz
Copy link
Member Author

cmacknz commented Jun 13, 2023

Bumping this to P1, we recently had a change that broke the service runtime because there are no tests with a real service. The original change in #2845 resulted in endpoint being unable to start.

@jlind23
Copy link
Contributor

jlind23 commented Jul 7, 2023

Postponing this one for now and we will rather focus on #2963

@cmacknz
Copy link
Member Author

cmacknz commented Jul 7, 2023

I think we can just close this it is covered by the PR you linked, which has a separate issue tracked for that specific test.

@cmacknz cmacknz closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants