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
0e48348b
Commit
0e48348b
authored
Aug 12, 2021
by
Andrejs Cunskis
Committed by
Mark Lapierre
Aug 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Update bulk group import via api spec
parent
22cf4a79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
qa/qa/resource/bulk_import_group.rb
qa/qa/resource/bulk_import_group.rb
+13
-4
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
+8
-12
No files found.
qa/qa/resource/bulk_import_group.rb
View file @
0e48348b
...
@@ -35,10 +35,7 @@ module QA
...
@@ -35,10 +35,7 @@ module QA
end
end
def
fabricate_via_api!
def
fabricate_via_api!
response
=
post
(
Runtime
::
API
::
Request
.
new
(
api_client
,
api_post_path
).
url
,
api_post_body
)
resource_web_url
(
api_post
)
@import_id
=
parse_body
(
response
)[
:id
]
"
#{
gitlab_address
}
/
#{
full_path
}
"
end
end
def
api_post_path
def
api_post_path
...
@@ -71,6 +68,18 @@ module QA
...
@@ -71,6 +68,18 @@ module QA
parse_body
(
response
)[
:status
]
parse_body
(
response
)[
:status
]
end
end
private
def
transform_api_resource
(
api_resource
)
return
api_resource
if
api_resource
[
:web_url
]
# override transformation only for /bulk_imports endpoint which doesn't have web_url in response and
# ignore others so import_id is not overwritten incorrectly
api_resource
[
:web_url
]
=
"
#{
gitlab_address
}
/
#{
full_path
}
"
api_resource
[
:import_id
]
=
api_resource
[
:id
]
api_resource
end
end
end
end
end
end
end
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
View file @
0e48348b
...
@@ -78,9 +78,6 @@ module QA
...
@@ -78,9 +78,6 @@ module QA
'imports group with subgroups and labels'
,
'imports group with subgroups and labels'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1871'
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1871'
)
do
)
do
Page
::
Group
::
BulkImport
.
perform
do
|
import_page
|
imported_group
expect
{
imported_group
.
import_status
}.
to
(
expect
{
imported_group
.
import_status
}.
to
(
eventually_eq
(
'finished'
).
within
(
max_duration:
300
,
sleep_interval:
2
)
eventually_eq
(
'finished'
).
within
(
max_duration:
300
,
sleep_interval:
2
)
)
)
...
@@ -93,7 +90,6 @@ module QA
...
@@ -93,7 +90,6 @@ module QA
expect
(
imported_subgroup
.
labels
).
to
include
(
*
subgroup
.
labels
)
expect
(
imported_subgroup
.
labels
).
to
include
(
*
subgroup
.
labels
)
end
end
end
end
end
after
do
after
do
user
.
remove_via_api!
user
.
remove_via_api!
...
...
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