Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
38ecd59d
Commit
38ecd59d
authored
Apr 07, 2022
by
Andrejs Cunskis
Committed by
Chloe Liu
Apr 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Large repo gitlab migration test
parent
ef4b7929
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
438 additions
and
33 deletions
+438
-33
qa/qa/resource/bulk_import_group.rb
qa/qa/resource/bulk_import_group.rb
+9
-7
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+7
-8
qa/qa/specs/features/api/1_manage/import_large_github_repo_spec.rb
...cs/features/api/1_manage/import_large_github_repo_spec.rb
+22
-18
qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb
...1_manage/migration/gitlab_migration_large_project_spec.rb
+400
-0
No files found.
qa/qa/resource/bulk_import_group.rb
View file @
38ecd59d
...
...
@@ -7,10 +7,14 @@ module QA
:destination_group
,
:import_id
attribute
:access_token
do
attribute
:
import_
access_token
do
api_client
.
personal_access_token
end
attribute
:gitlab_address
do
QA
::
Runtime
::
Scenario
.
gitlab_address
end
# In most cases we will want to set path the same as source group
# but it can be set to a custom name as well when imported via API
attribute
:destination_group_path
do
...
...
@@ -19,18 +23,16 @@ module QA
# Can't define path as attribue since @path is set in base class initializer
alias_method
:path
,
:destination_group_path
delegate
:gitlab_address
,
to:
'QA::Runtime::Scenario'
def
fabricate_via_browser_ui!
def
fabricate!
Page
::
Main
::
Menu
.
perform
(
&
:go_to_create_group
)
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
switch_to_import_tab
group
.
connect_gitlab_instance
(
gitlab_address
,
api_client
.
personal
_access_token
)
group
.
connect_gitlab_instance
(
gitlab_address
,
import
_access_token
)
end
Page
::
Group
::
BulkImport
.
perform
do
|
import_page
|
import_page
.
import_group
(
path
,
sandbox
.
path
)
import_page
.
import_group
(
destination_group_path
,
sandbox
.
full_
path
)
end
reload!
...
...
@@ -49,7 +51,7 @@ module QA
{
configuration:
{
url:
gitlab_address
,
access_token:
access_token
access_token:
import_
access_token
},
entities:
[
{
...
...
qa/qa/resource/project.rb
View file @
38ecd59d
...
...
@@ -343,16 +343,17 @@ module QA
parse_body
(
response
)
end
def
pipelines
response
=
get
(
request_url
(
api_pipelines_path
))
parse_body
(
response
)
end
def
pipeline_schedules
response
=
get
(
request_url
(
api_pipeline_schedules_path
))
parse_body
(
response
)
end
def
pipelines
(
auto_paginate:
false
,
attempts:
0
)
return
parse_body
(
api_get_from
(
api_pipelines_path
))
unless
auto_paginate
auto_paginated_response
(
request_url
(
api_pipelines_path
,
per_page:
'100'
),
attempts:
attempts
)
end
def
issues
(
auto_paginate:
false
,
attempts:
0
)
return
parse_body
(
api_get_from
(
api_issues_path
))
unless
auto_paginate
...
...
@@ -387,9 +388,7 @@ module QA
api_resource
[
:import_status
]
==
"finished"
end
unless
mirror_succeeded
raise
"Mirroring failed with error:
#{
api_resource
[
:import_error
]
}
"
end
raise
"Mirroring failed with error:
#{
api_resource
[
:import_error
]
}
"
unless
mirror_succeeded
end
def
remove_via_api!
...
...
qa/qa/specs/features/api/1_manage/import_large_github_repo_spec.rb
View file @
38ecd59d
...
...
@@ -111,7 +111,7 @@ module QA
user
.
remove_via_api!
unless
example
.
exception
next
unless
defined?
(
@import_time
)
# save data for comparison
after run finished
# save data for comparison
notification creation
save_json
(
"data"
,
{
...
...
@@ -121,6 +121,7 @@ module QA
source:
{
name:
"GitHub"
,
project_name:
github_repo
,
data:
{
branches:
gh_branches
.
length
,
commits:
gh_commits
.
length
,
labels:
gh_labels
.
length
,
...
...
@@ -129,10 +130,12 @@ module QA
mr_comments:
gh_prs
.
sum
{
|
_k
,
v
|
v
[
:comments
].
length
},
issues:
gh_issues
.
length
,
issue_comments:
gh_issues
.
sum
{
|
_k
,
v
|
v
[
:comments
].
length
}
}
},
target:
{
name:
"GitLab"
,
project_name:
imported_project
.
path_with_namespace
,
data:
{
branches:
gl_branches
.
length
,
commits:
gl_commits
.
length
,
labels:
gl_labels
.
length
,
...
...
@@ -141,6 +144,7 @@ module QA
mr_comments:
mrs
.
sum
{
|
_k
,
v
|
v
[
:comments
].
length
},
issues:
gl_issues
.
length
,
issue_comments:
gl_issues
.
sum
{
|
_k
,
v
|
v
[
:comments
].
length
}
}
},
not_imported:
{
mrs:
@mr_diff
,
...
...
@@ -158,7 +162,7 @@ module QA
start
=
Time
.
now
# import the project and log gitlab path
Runtime
::
L
ogger
.
info
(
"== Importing project '
#{
github_repo
}
' in to '
#{
imported_project
.
reload!
.
full_path
}
' =="
)
l
ogger
.
info
(
"== Importing project '
#{
github_repo
}
' in to '
#{
imported_project
.
reload!
.
full_path
}
' =="
)
# fetch all objects right after import has started
fetch_github_objects
...
...
qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb
0 → 100644
View file @
38ecd59d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment