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
...
@@ -23,6 +23,7 @@ module QA
groups_page
.
click_new_group
groups_page
.
click_new_group
Page
::
Group
::
New
.
perform
do
|
group
|
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
click_create_group
group
.
set_path
(
path
)
group
.
set_path
(
path
)
group
.
set_visibility
(
'Public'
)
group
.
set_visibility
(
'Public'
)
group
.
create
group
.
create
...
...
qa/qa/specs/features/api/1_manage/bulk_import_group_spec.rb
View file @
a4b06f39
# frozen_string_literal: true
# frozen_string_literal: true
module
QA
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
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
(
:import_wait_duration
)
{
{
max_duration:
300
,
sleep_interval:
2
}
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
let
(
:user
)
do
...
@@ -38,15 +38,11 @@ module QA
...
@@ -38,15 +38,11 @@ module QA
end
end
before
do
before
do
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
end
end
after
do
after
do
user
.
remove_via_api!
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
end
context
'with subgroups and labels'
do
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
# frozen_string_literal: true
module
QA
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
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
(
:import_wait_duration
)
{
{
max_duration:
300
,
sleep_interval:
2
}
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
let
(
:user
)
do
...
@@ -56,7 +56,6 @@ module QA
...
@@ -56,7 +56,6 @@ module QA
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?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
...
@@ -67,7 +66,6 @@ module QA
...
@@ -67,7 +66,6 @@ module QA
user
.
remove_via_api!
user
.
remove_via_api!
ensure
ensure
Runtime
::
Feature
.
disable
(
:bulk_import_projects
)
Runtime
::
Feature
.
disable
(
:bulk_import_projects
)
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
end
context
'with project'
do
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
...
@@ -4,17 +4,16 @@ module QA
RSpec
.
describe
'Manage'
,
:requires_admin
do
RSpec
.
describe
'Manage'
,
:requires_admin
do
describe
'Bulk group import'
do
describe
'Bulk group import'
do
let!
(
:staging?
)
{
Runtime
::
Scenario
.
gitlab_address
.
include?
(
'staging.gitlab.com'
)
}
let!
(
:staging?
)
{
Runtime
::
Scenario
.
gitlab_address
.
include?
(
'staging.gitlab.com'
)
}
let!
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let!
(
:user
)
do
let
(
:user
)
do
Resource
::
User
.
fabricate_via_api!
do
|
usr
|
Resource
::
User
.
fabricate_via_api!
do
|
usr
|
usr
.
api_client
=
admin_api_client
usr
.
api_client
=
admin_api_client
usr
.
hard_delete_on_api_removal
=
true
usr
.
hard_delete_on_api_removal
=
true
end
end
end
end
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
user:
user
)
}
let
!
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
user:
user
)
}
let
(
:personal_access_token
)
{
api_client
.
personal_access_token
}
let
!
(
:personal_access_token
)
{
api_client
.
personal_access_token
}
let
(
:sandbox
)
do
let
(
:sandbox
)
do
Resource
::
Sandbox
.
fabricate_via_api!
do
|
group
|
Resource
::
Sandbox
.
fabricate_via_api!
do
|
group
|
...
@@ -23,7 +22,9 @@ module QA
...
@@ -23,7 +22,9 @@ module QA
end
end
let
(
:source_group
)
do
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
.
api_client
=
api_client
group
.
path
=
"source-group-for-import-
#{
SecureRandom
.
hex
(
4
)
}
"
group
.
path
=
"source-group-for-import-
#{
SecureRandom
.
hex
(
4
)
}
"
end
end
...
@@ -38,14 +39,12 @@ module QA
...
@@ -38,14 +39,12 @@ module QA
end
end
before
do
before
do
Runtime
::
Feature
.
enable
(
:top_level_group_creation_enabled
)
if
staging?
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
# create groups explicitly before connecting gitlab instance
Flow
::
Login
.
sign_in
(
as:
user
)
source_group
source_group
Flow
::
Login
.
sign_in
(
as:
user
)
Page
::
Main
::
Menu
.
perform
(
&
:go_to_create_group
)
Page
::
Main
::
Menu
.
perform
(
&
:go_to_create_group
)
Page
::
Group
::
New
.
perform
do
|
group
|
Page
::
Group
::
New
.
perform
do
|
group
|
group
.
switch_to_import_tab
group
.
switch_to_import_tab
...
@@ -53,6 +52,10 @@ module QA
...
@@ -53,6 +52,10 @@ module QA
end
end
end
end
after
do
user
.
remove_via_api!
end
it
(
it
(
'imports group from UI'
,
'imports group from UI'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1806'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1806'
,
...
@@ -72,12 +75,6 @@ module QA
...
@@ -72,12 +75,6 @@ module QA
end
end
end
end
end
end
after
do
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:top_level_group_creation_enabled
)
if
staging?
end
end
end
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