Failure in browser_ui/3_create/repository/push_protected_branch_spec.rb | Create Protected branch support when developers and maintainers are not allowed to push to a protected branch user without push rights fails to push to the protected branch

Full description

Create Protected branch support when developers and maintainers are not allowed to push to a protected branch user without push rights fails to push to the protected branch

File path

./qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb

Stack trace

Failure/Error: expect { push_new_file(branch_name) }.to raise_error(QA::Support::Run::CommandError, /remote: GitLab: You are not allowed to push code to protected branches on this project\.([\s\S]+)\[remote rejected\] #{branch_name} -> #{branch_name} \(pre-receive hook declined\)/)

  expected QA::Support::Run::CommandError with message matching /remote: GitLab: You are not allowed to push code to protected branches on this project\.([\s\S]+)\[remote rejected\] protected-branch -> protected-branch \(pre-receive hook declined\)/, got #<QA::Support::Run::CommandError: The command HOME="/tmp/qa-netrc-credentials/21" git push http://roo...x-group/qa-test-2020-12-14-16-23-21-b5c4d569c8bb0f0a/protected-branch-project-4521f2b2bd2d0a14.git'> with backtrace:
    # ./qa/support/run.rb:36:in `run'
    # ./qa/git/repository.rb:299:in `run_git'
    # ./qa/git/repository.rb:131:in `push_changes'
    # ./qa/resource/repository/push.rb:99:in `block in fabricate!'
    # ./qa/scenario/actable.rb:16:in `perform'
    # ./qa/git/repository.rb:32:in `block (2 levels) in perform'
    # ./qa/git/repository.rb:32:in `chdir'
    # ./qa/git/repository.rb:32:in `block in perform'
    # ./qa/git/repository.rb:31:in `perform'
    # ./qa/resource/repository/push.rb:51:in `fabricate!'
    # ./qa/resource/repository/project_push.rb:42:in `fabricate!'
    # ./qa/resource/base.rb:30:in `block (2 levels) in fabricate_via_browser_ui!'
    # ./qa/resource/base.rb:135:in `log_fabrication'
    # ./qa/resource/base.rb:30:in `block in fabricate_via_browser_ui!'
    # ./qa/resource/base.rb:118:in `do_fabricate!'
    # ./qa/resource/base.rb:29:in `fabricate_via_browser_ui!'
    # ./qa/resource/base.rb:21:in `rescue in fabricate!'
    # ./qa/resource/base.rb:18:in `fabricate!'
    # ./qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb:51:in `push_new_file'
    # ./qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb:38:in `block (5 levels) in <module:QA>'
    # ./qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb:38:in `block (4 levels) in <module:QA>'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:123:in `block in run'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `loop'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `run'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
    # ./spec/spec_helper.rb:73:in `block (2 levels) in <top (required)>'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:123:in `block in run'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `loop'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `run'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
    # /usr/local/bundle/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
    # ./qa/specs/runner.rb:71:in `perform'
    # ./qa/scenario/template.rb:10:in `block in perform'
    # ./qa/scenario/template.rb:8:in `tap'
    # ./qa/scenario/template.rb:8:in `perform'
    # ./qa/scenario/template.rb:35:in `perform'
    # ./qa/scenario/template.rb:10:in `block in perform'
    # ./qa/scenario/template.rb:8:in `tap'
    # ./qa/scenario/template.rb:8:in `perform'
    # ./qa/scenario/bootable.rb:28:in `launch!'

First happened in https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/jobs/910119037.