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
a4b06f39
Commit
a4b06f39
authored
Nov 11, 2021
by
Andrejs Cunskis
Committed by
Dan Davison
Nov 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Remove use of create_top_level_group feature toggle in import specs
parent
be3e9d52
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
28 deletions
+20
-28
qa/qa/resource/sandbox.rb
qa/qa/resource/sandbox.rb
+1
-0
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
+3
-7
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
...a/specs/features/api/1_manage/bulk_import_project_spec.rb
+3
-5
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
+13
-16
No files found.
qa/qa/resource/sandbox.rb
View file @
a4b06f39
...
...
@@ -23,6 +23,7 @@ module QA
groups_page
.
click_new_group
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
click_create_group
group
.
set_path
(
path
)
group
.
set_visibility
(
'Public'
)
group
.
create
...
...
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
View file @
a4b06f39
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Manage'
,
:requires_admin
do
# run only base UI validation on staging because test requires top level group creation which is problematic
# on staging environment
RSpec
.
describe
'Manage'
,
:requires_admin
,
except:
{
subdomain: :staging
}
do
describe
'Bulk group import'
do
let!
(
:staging?
)
{
Runtime
::
Scenario
.
gitlab_address
.
include?
(
'staging.gitlab.com'
)
}
let
(
:import_wait_duration
)
{
{
max_duration:
300
,
sleep_interval:
2
}
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
...
...
@@ -38,15 +38,11 @@ module QA
end
before
do
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
end
after
do
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
context
'with subgroups and labels'
do
...
...
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
View file @
a4b06f39
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Manage'
,
:requires_admin
do
# run only base UI validation on staging because test requires top level group creation which is problematic
# on staging environment
RSpec
.
describe
'Manage'
,
:requires_admin
,
except:
{
subdomain: :staging
}
do
describe
'Bulk project import'
do
let!
(
:staging?
)
{
Runtime
::
Scenario
.
gitlab_address
.
include?
(
'staging.gitlab.com'
)
}
let
(
:import_wait_duration
)
{
{
max_duration:
300
,
sleep_interval:
2
}
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
...
...
@@ -56,7 +56,6 @@ module QA
before
do
Runtime
::
Feature
.
enable
(
:bulk_import_projects
)
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
...
...
@@ -67,7 +66,6 @@ module QA
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:bulk_import_projects
)
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
context
'with project'
do
...
...
qa/qa/specs/features/browser_ui/1_manage/group/bulk_import_group_spec.rb
View file @
a4b06f39
...
...
@@ -4,17 +4,16 @@ module QA
RSpec
.
describe
'Manage'
,
:requires_admin
do
describe
'Bulk group import'
do
let!
(
:staging?
)
{
Runtime
::
Scenario
.
gitlab_address
.
include?
(
'staging.gitlab.com'
)
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
let!
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let!
(
:user
)
do
Resource
::
User
.
fabricate_via_api!
do
|
usr
|
usr
.
api_client
=
admin_api_client
usr
.
hard_delete_on_api_removal
=
true
end
end
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
user:
user
)
}
let
(
:personal_access_token
)
{
api_client
.
personal_access_token
}
let
!
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
user:
user
)
}
let
!
(
:personal_access_token
)
{
api_client
.
personal_access_token
}
let
(
:sandbox
)
do
Resource
::
Sandbox
.
fabricate_via_api!
do
|
group
|
...
...
@@ -23,7 +22,9 @@ module QA
end
let
(
:source_group
)
do
Resource
::
Sandbox
.
fabricate_via_api!
do
|
group
|
# top level group can't be created on staging via api, create via UI
fabricate_method
=
staging?
?
:fabricate_via_browser_ui!
:
:fabricate_via_api!
Resource
::
Sandbox
.
send
(
fabricate_method
)
do
|
group
|
group
.
api_client
=
api_client
group
.
path
=
"source-group-for-import-
#{
SecureRandom
.
hex
(
4
)
}
"
end
...
...
@@ -38,14 +39,12 @@ module QA
end
before
do
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
# create groups explicitly before connecting gitlab instance
Flow
::
Login
.
sign_in
(
as:
user
)
source_group
Flow
::
Login
.
sign_in
(
as:
user
)
Page
::
Main
::
Menu
.
perform
(
&
:go_to_create_group
)
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
switch_to_import_tab
...
...
@@ -53,6 +52,10 @@ module QA
end
end
after
do
user
.
remove_via_api!
end
it
(
'imports group from UI'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1806'
,
...
...
@@ -72,12 +75,6 @@ module QA
end
end
end
after
do
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
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