Transient failure in qa/specs/features/api/1_manage/user_access_termination_spec | multiple failures due to pre-existing data

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Appears some cleanup failed as all three of the related errors in this here seem to indicate pre-existing repositories, branch names and files.

Seems similar in nature to previous issues with this test, but are not identical.

Stack trace

Failure/Error:
       expect do
         Resource::Repository::Push.fabricate! do |push|
           push.repository_http_uri = @project.repository_http_location.uri
           push.file_name = 'test.txt'
           push.file_content = "# This is a test project named #{@project.name}"
           push.commit_message = 'Add test.txt'
           push.branch_name = 'new_branch'
           push.user = @user
         end
       end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/)
     
       expected QA::Support::Run::CommandError with message matching /You are not allowed to push code to this project/, got #<QA::Support::Run::CommandError: The command HOME="/tmp/qa-netrc-credentials/21" git push https://qa...') before pushing again.
       hint: See the 'Note about fast-forwards' in 'git push --help' for details.> with backtrace:

Additional Git Debug

D, [2021-06-01T20:03:31.491267 #21] DEBUG -- : Git: pwd=[/tmp/d20210601-21-1fd8nsj], command=[HOME="/tmp/qa-netrc-credentials/21" git push https://qa-user-f3100256eb7dc480@staging.gitlab.com/gitlab-qa-sandbox-group/group-to-test-access-termination-a652c67e257dd56b/project-for-user-group-access-termination-c55e934cb9f29fe1.git new_branch:new_branch 2>&1]
D, [2021-06-01T20:03:31.974041 #21] DEBUG -- : Git: output=[To https://staging.gitlab.com/gitlab-qa-sandbox-group/group-to-test-access-termination-a652c67e257dd56b/project-for-user-group-access-termination-c55e934cb9f29fe1.git
 ! [rejected]        new_branch -> new_branch (non-fast-forward)
error: failed to push some refs to 'https://qa-user-f3100256eb7dc480@staging.gitlab.com/gitlab-qa-sandbox-group/group-to-test-access-termination-a652c67e257dd56b/project-for-user-group-access-termination-c55e934cb9f29fe1.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.], exitstatus=[1]

Screenshot / HTML page

Possible fixes

Edited by 🤖 GitLab Bot 🤖