Skip to content

Fix flaky test for disabled bot comment

What does this MR do and why?

This MR fixes flaky test caused by unique validation of approval rule name:

Failing job

ActiveRecord::RecordInvalid:
       Validation failed: Name has already been taken

The name is generated by a sequence in a factory.

For this context, we can define the name in a static way to avoid conflicts.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #456130 (closed)

Merge request reports