Skip to content

Elasticsearch Delete by query before examples

What does this MR do?

Related to #325719 (closed)

Add a new Rspec test helper that only creates/deletes the indexes at the start of the context. The Elasticsearch API DeleteByQuery is used to delete all data in Elasticsearch before each example instead. This is done by using delete_by_query with a match_all query (with 5 slices, and instructing ES to proceed on conflicts)

Before

After

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Terri Chu

Merge request reports