Failure in api/1_manage/project_access_token_spec.rb | Manage Project access token for the same project can be used to create a file via the project API
Full description
Manage Project access token for the same project can be used to create a file via the project API
File path
./qa/specs/features/api/1_manage/project_access_token_spec.rb
Stack trace
Failure/Error:
expect do
Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client
file.project = @project_access_token.project
file.branch = "new_branch_#{SecureRandom.hex(8)}"
file.commit_message = 'Add new file'
file.name = "text-#{SecureRandom.hex(8)}.txt"
file.content = 'New file'
end
end.not_to raise_error
expected no Exception, got #<QA::Resource::Errors::ResourceFabricationFailedError: Fabrication of QA::Resource::File using the A...%3A%28match_phrase%3A%28json.correlation_id%3A%2768d2a536b132d99985e665655ad2ad0d%27%29%29%29%29%29> with backtrace:
# ./qa/resource/api_fabricator.rb:131:in `api_post_to'
# ./qa/resource/api_fabricator.rb:104:in `api_post'
# ./qa/resource/api_fabricator.rb:29:in `fabricate_via_api!'
# ./qa/resource/base.rb:65:in `block (2 levels) in fabricate_via_api!'
# ./qa/resource/base.rb:96:in `log_and_record_fabrication'
# ./qa/resource/base.rb:65:in `block in fabricate_via_api!'
# ./qa/resource/base.rb:86:in `do_fabricate!'
# ./qa/resource/base.rb:64:in `fabricate_via_api!'
# ./qa/specs/features/api/1_manage/project_access_token_spec.rb:19:in `block (5 levels) in <module:QA>'
# ./qa/specs/features/api/1_manage/project_access_token_spec.rb:18:in `block (4 levels) in <module:QA>'
# ./qa/specs/spec_helper.rb:121:in `block (2 levels) in <top (required)>'
# ./qa/specs/runner.rb:67:in `perform'
# ./qa/scenario/template.rb:10:in `block in perform'
# ./qa/scenario/template.rb:8:in `perform'
# ./qa/scenario/template.rb:50:in `perform'
# ./qa/scenario/template.rb:10:in `block in perform'
# ./qa/scenario/template.rb:8:in `perform'
# ./qa/scenario/bootable.rb:52:in `launch!'
First happened in https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/9565480.
Related test case: https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347858.