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

[Investigations] Audit the clean-up of data in Cypress #175095

Open
Tracked by #173327
MadameSheema opened this issue Jan 18, 2024 · 4 comments
Open
Tracked by #173327

[Investigations] Audit the clean-up of data in Cypress #175095

MadameSheema opened this issue Jan 18, 2024 · 4 comments
Assignees
Labels
Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team

Comments

@MadameSheema
Copy link
Member

Relates to:

#173327
#174247

Each spec file is executed on a clean environment, but, retries are not. Retries are executed on the same environment the execution was initiated, this is why is pretty important to make sure that the data the test may generate is cleaned at the beginning.

We need to make sure that the data the test might generate during its execution is properly cleaned. The best way to clean data is to make sure that all the data the test might generate or create is deleted at the beginning of it in a beforeEach hook.

Making this exercise is beneficial as well to end-up having tests that are independent of each other.

@MadameSheema MadameSheema added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team labels Jan 18, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@logeekal
Copy link
Contributor

I went through the tests and could not all investgations tests are loading the data in beforeEach so i think it can be closed.

@MadameSheema
Copy link
Member Author

@logeekal it cannot be closed if when doing the audit, it was not included to check that the data created by the test itself is deleted.

For instance, a test that creates a new timeline and checks that the timeline has been correctly created, in order to do so, no data is needed. But the test creates a timeline, so we ned to check that this new data is deleted.

@PhilippeOberti PhilippeOberti removed this from the 8.16 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team
Projects
None yet
Development

No branches or pull requests

5 participants