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
23a7a7f0
Commit
23a7a7f0
authored
Oct 20, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for failure presence for bulk imports
Fix yard doc return type
parent
df5a6a0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
qa/qa/resource/bulk_import_group.rb
qa/qa/resource/bulk_import_group.rb
+12
-0
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
...a/specs/features/api/1_manage/bulk_import_project_spec.rb
+6
-0
No files found.
qa/qa/resource/bulk_import_group.rb
View file @
23a7a7f0
...
@@ -59,6 +59,9 @@ module QA
...
@@ -59,6 +59,9 @@ module QA
}
}
end
end
# Get import status
#
# @return [String]
def
import_status
def
import_status
response
=
get
(
Runtime
::
API
::
Request
.
new
(
api_client
,
"/bulk_imports/
#{
import_id
}
"
).
url
)
response
=
get
(
Runtime
::
API
::
Request
.
new
(
api_client
,
"/bulk_imports/
#{
import_id
}
"
).
url
)
...
@@ -69,6 +72,15 @@ module QA
...
@@ -69,6 +72,15 @@ module QA
parse_body
(
response
)[
:status
]
parse_body
(
response
)[
:status
]
end
end
# Get import details
#
# @return [Array]
def
import_details
response
=
get
(
Runtime
::
API
::
Request
.
new
(
api_client
,
"/bulk_imports/
#{
import_id
}
/entities"
).
url
)
parse_body
(
response
)
end
private
private
def
transform_api_resource
(
api_resource
)
def
transform_api_resource
(
api_resource
)
...
...
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
View file @
23a7a7f0
...
@@ -48,6 +48,10 @@ module QA
...
@@ -48,6 +48,10 @@ module QA
imported_group
.
reload!
.
projects
imported_group
.
reload!
.
projects
end
end
let
(
:import_details
)
do
imported_group
.
import_details
.
find
{
|
entity
|
entity
[
:destination_name
]
==
source_project
.
name
}
end
before
do
before
do
Runtime
::
Feature
.
enable
(
:bulk_import_projects
)
Runtime
::
Feature
.
enable
(
:bulk_import_projects
)
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
...
@@ -70,6 +74,7 @@ module QA
...
@@ -70,6 +74,7 @@ module QA
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2297'
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2297'
)
do
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
import_details
[
:failures
]).
to
be_empty
,
"Expected to not have import errors, was:
#{
import_details
}
"
aggregate_failures
do
aggregate_failures
do
expect
(
imported_projects
.
count
).
to
eq
(
1
)
expect
(
imported_projects
.
count
).
to
eq
(
1
)
...
@@ -109,6 +114,7 @@ module QA
...
@@ -109,6 +114,7 @@ module QA
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2325'
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2325'
)
do
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
import_details
[
:failures
]).
to
be_empty
,
"Expected to not have import errors, was:
#{
import_details
}
"
aggregate_failures
do
aggregate_failures
do
expect
(
imported_issues
.
count
).
to
eq
(
1
)
expect
(
imported_issues
.
count
).
to
eq
(
1
)
...
...
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