Skip to content

Fixes a spec that was passing on retry only

Rémy Coutable requested to merge fix-spec-passing-on-retry-only into master

What does this MR do?

I believe 19672217 did change the permissions to allow maintainers to change the reject_unsigned_commits and commit_committer_check settings even when it's enabled globally, but the controller spec wasn't change accordingly.

Interestingly, the specs were always failing on first try (expected), but passed on retry, probably due to rspec-retry which doesn't completely resets the state between retries.

Before this change, the following would always fail locally:

bin/rspec -f doc './ee/spec/controllers/projects/push_rules_controller_spec.rb[1:1:4:2:1:3:1:1]'

and always pass on second try with:

RETRIES=1 bin/rspec -f doc './ee/spec/controllers/projects/push_rules_controller_spec.rb[1:1:4:2:1:3:1:1]'

This was identified from gitlab-org/quality/triage-reports#3864 (closed):

./ee/spec/controllers/projects/push_rules_controller_spec.rb[1:1:4:2:1:3:1:1]: 508
./ee/spec/controllers/projects/push_rules_controller_spec.rb[1:1:3:2:1:3:1:1]: 508
Edited by Rémy Coutable

Merge request reports

Loading