Skip to content
Snippets Groups Projects
Commit d64de9d1 authored by Andrejs Cunskis's avatar Andrejs Cunskis :flag_lv: Committed by Chloe Liu
Browse files

E2E: subgroup support for source group in import spec

parent fdfacf13
No related branches found
No related tags found
1 merge request!135118E2E: subgroup support for source group in import spec
......@@ -34,7 +34,13 @@ module QA
let!(:source_api_client) { source_admin_api_client }
let!(:source_group) do
create(:sandbox, api_client: source_api_client, path: gitlab_source_group)
paths = gitlab_source_group.split("/")
sandbox = build(:sandbox, api_client: source_api_client, path: paths.first).reload!
next sandbox if paths.size == 1
paths[1..].each_with_object([sandbox]) do |path, arr|
arr << build(:group, api_client: source_api_client, sandbox: arr.last, path: path).reload!
end.last
end
# generate unique target group because source group has a static name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment