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
5a5feccb
Commit
5a5feccb
authored
May 27, 2021
by
Mark Lapierre
Committed by
Rémy Coutable
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group GET path when sandbox is a subgroup
parent
1f28d0e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
qa/qa/resource/group.rb
qa/qa/resource/group.rb
+27
-1
qa/qa/specs/features/browser_ui/1_manage/group/bulk_import_group_spec.rb
...tures/browser_ui/1_manage/group/bulk_import_group_spec.rb
+0
-8
No files found.
qa/qa/resource/group.rb
View file @
5a5feccb
...
...
@@ -57,7 +57,7 @@ module QA
end
def
api_get_path
"/groups/
#{
CGI
.
escape
(
"
#{
sandbox
.
path
}
/
#{
path
}
"
)
}
"
"/groups/
#{
CGI
.
escape
(
"
#{
determine_full_
path
}
"
)
}
"
end
def
api_post_body
...
...
@@ -100,6 +100,32 @@ module QA
'Timed out while waiting for the group repository storage move to finish'
)
end
private
# Determine the path up to the root group.
#
# This is equivalent to the full_path API attribute. We can't use the full_path attribute
# because it depends on the group being fabricated first, and we use this method to help
# _check_ if the group exists.
#
# @param [QA::Resource::GroupBase] sandbox the immediate parent group of this group
# @param [String] path the path name of this group (the leaf, not the full path)
# @return [String]
def
determine_full_path
determine_parent_group_paths
(
sandbox
,
path
)
end
# Recursively traverse the parents of this group up to the root group.
#
# @param [QA::Resource::GroupBase] parent the immediate parent group
# @param [String] path the path traversed so far
# @return [String]
def
determine_parent_group_paths
(
parent
,
path
)
return
"
#{
parent
.
path
}
/
#{
path
}
"
unless
parent
.
respond_to?
(
:sandbox
)
determine_parent_group_paths
(
parent
.
sandbox
,
"
#{
parent
.
path
}
/
#{
path
}
"
)
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/group/bulk_import_group_spec.rb
View file @
5a5feccb
...
...
@@ -92,14 +92,6 @@ module QA
aggregate_failures
do
expect
(
import_page
).
to
have_imported_group
(
source_group
.
path
,
wait:
120
)
expect
(
imported_group
).
to
eq
(
source_group
)
expect
(
imported_subgroup
).
to
eq
(
subgroup
)
# TODO: Improve validation logic with some potential retry mechanism built in to custom rspec matcher
# https://gitlab.com/gitlab-org/gitlab/-/issues/331704
# expect(imported_group.labels).to include(*source_group.labels)
expect
(
imported_subgroup
.
labels
).
to
include
(
*
subgroup
.
labels
)
end
end
end
...
...
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