Skip to content
代码片段 群组 项目
未验证 提交 110bcd58 编辑于 作者: Andrejs Cunskis's avatar Andrejs Cunskis 提交者: GitLab
浏览文件

Merge branch 'jmd/harden-pipeline-with-protected-variable-spec' into 'master'

[E2E] Harden pipeline with protected variable spec

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140087



Merged-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Approved-by: default avatarHarsha Muralidhar <hmuralidhar@gitlab.com>
Approved-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Co-authored-by: default avatarJohn McDonnell <jmcdonnell@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -91,23 +91,43 @@ def create_protected_branch ...@@ -91,23 +91,43 @@ def create_protected_branch
end end
def user_commit_to_protected_branch(api_client) def user_commit_to_protected_branch(api_client)
create(:commit, # Retry is needed due to delays with project authorization updates
api_client: api_client, # Long term solution to accessing the status of a project authorization update
project: project, # has been proposed in https://gitlab.com/gitlab-org/gitlab/-/issues/393369
branch: 'protected-branch', Support::Retrier.retry_until(
commit_message: Faker::Lorem.sentence, actions: [ max_duration: 60,
{ action: 'create', file_path: Faker::File.unique.file_name, content: Faker::Lorem.sentence } sleep_interval: 1,
]) message: "Commit to protected branch failed",
retry_on_exception: true
) do
create(:commit,
api_client: api_client,
project: project,
branch: 'protected-branch',
commit_message: Faker::Lorem.sentence, actions: [
{ action: 'create', file_path: Faker::File.unique.file_name, content: Faker::Lorem.sentence }
])
end
end end
def create_merge_request(api_client) def create_merge_request(api_client)
create(:merge_request, # Retry is needed due to delays with project authorization updates
api_client: api_client, # Long term solution to accessing the status of a project authorization update
project: project, # has been proposed in https://gitlab.com/gitlab-org/gitlab/-/issues/393369
description: Faker::Lorem.sentence, Support::Retrier.retry_until(
target_new_branch: false, max_duration: 60,
file_name: Faker::File.unique.file_name, sleep_interval: 1,
file_content: Faker::Lorem.sentence) message: "MR fabrication failed after retry",
retry_on_exception: true
) do
create(:merge_request,
api_client: api_client,
project: project,
description: Faker::Lorem.sentence,
target_new_branch: false,
file_name: Faker::File.unique.file_name,
file_content: Faker::Lorem.sentence)
end
end end
def go_to_pipeline_job(user) def go_to_pipeline_job(user)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册