Skip to content
代码片段 群组 项目
提交 63ea5c75 编辑于 作者: Tiffany Rea's avatar Tiffany Rea
浏览文件

Merge branch 'g385353-dequarantine-github-mirror-spec' into 'master'

Dequarantines `pipeline_for_project_mirror_github_spec`

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



Merged-by: default avatarTiffany Rea <trea@gitlab.com>
Approved-by: default avatarTiffany Rea <trea@gitlab.com>
Approved-by: default avatarJohn McDonnell <jmcdonnell@gitlab.com>
Reviewed-by: default avatarAndrejs Cunskis <acunskis@gitlab.com>
Reviewed-by: default avatarRichard Chong <rchong@gitlab.com>
Co-authored-by: default avatarRichard Chong <rchong@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -71,7 +71,11 @@ def has_go_to_project_link?(gh_project_name) ...@@ -71,7 +71,11 @@ def has_go_to_project_link?(gh_project_name)
# @param [String] source_project_name # @param [String] source_project_name
# @param [Integer] wait # @param [Integer] wait
# @return [Boolean] # @return [Boolean]
def has_imported_project?(gh_project_name, wait: QA::Support::WaitForRequests::DEFAULT_MAX_WAIT_TIME) def has_imported_project?(
gh_project_name,
wait: QA::Support::WaitForRequests::DEFAULT_MAX_WAIT_TIME,
allow_partial_import: false
)
within_element(:project_import_row, source_project: gh_project_name, skip_finished_loading_check: true) do within_element(:project_import_row, source_project: gh_project_name, skip_finished_loading_check: true) do
wait_until( wait_until(
max_duration: wait, max_duration: wait,
...@@ -80,18 +84,12 @@ def has_imported_project?(gh_project_name, wait: QA::Support::WaitForRequests::D ...@@ -80,18 +84,12 @@ def has_imported_project?(gh_project_name, wait: QA::Support::WaitForRequests::D
skip_finished_loading_check_on_refresh: true skip_finished_loading_check_on_refresh: true
) do ) do
status_selector = 'import_status_indicator' status_selector = 'import_status_indicator'
is_partial_import = has_css?(status_selector, text: 'Partially completed')
# Temporarily adding this for investigation purposes. This makes sure that the details section is return has_element?(status_selector, text: "Complete", wait: 1) unless allow_partial_import # rubocop:disable Cop/AvoidReturnFromBlocks
# expanded when the screenshot is taken when the test fails. This can be removed or repurposed later
# after investigation. Related: https://gitlab.com/gitlab-org/gitlab/-/issues/385252#note_1211218434
if is_partial_import
within_element_by_index(:import_status_indicator, 0) do
find('button').click
end
end
has_element?(status_selector, text: "Complete") ["Partially completed", "Complete"].any? do |status|
has_element?(status_selector, text: status, wait: 1)
end
end end
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
module Resource module Resource
class ProjectImportedFromGithub < Resource::Project class ProjectImportedFromGithub < Resource::Project
attr_accessor :issue_events_import, :full_notes_import, :attachments_import attr_accessor :issue_events_import, :full_notes_import, :attachments_import, :allow_partial_import
attribute :github_repo_id do attribute :github_repo_id do
github_client.repository(github_repository_path).id github_client.repository(github_repository_path).id
...@@ -24,7 +24,7 @@ def fabricate! ...@@ -24,7 +24,7 @@ def fabricate!
import_page.select_advanced_option(:attachments_import) if attachments_import import_page.select_advanced_option(:attachments_import) if attachments_import
import_page.import!(github_repository_path, group.full_path, name) import_page.import!(github_repository_path, group.full_path, name)
import_page.wait_for_success(github_repository_path, wait: 240) import_page.wait_for_success(github_repository_path, wait: 240, allow_partial_import: allow_partial_import)
end end
reload! reload!
......
...@@ -4,10 +4,7 @@ ...@@ -4,10 +4,7 @@
module QA module QA
describe 'Verify', :github, :requires_admin, only: { subdomain: %i[staging staging-canary] } do describe 'Verify', :github, :requires_admin, only: { subdomain: %i[staging staging-canary] } do
describe 'Pipeline for project mirrors Github', product_group: :pipeline_execution, quarantine: { describe 'Pipeline for project mirrors Github', product_group: :pipeline_execution do
type: :investigating,
issue: "https://gitlab.com/gitlab-org/gitlab/-/issues/385252"
} do
include QA::Support::Data::Github include QA::Support::Data::Github
let(:commit_message) { "Update #{github_data[:file_name]} - #{Time.now}" } let(:commit_message) { "Update #{github_data[:file_name]} - #{Time.now}" }
...@@ -44,6 +41,7 @@ module QA ...@@ -44,6 +41,7 @@ module QA
project.github_personal_access_token = github_data[:access_token] project.github_personal_access_token = github_data[:access_token]
project.github_repository_path = github_data[:repo] project.github_repository_path = github_data[:repo]
project.api_client = user_api_client project.api_client = user_api_client
project.allow_partial_import = true
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册