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
96aeab5c
Commit
96aeab5c
authored
Dec 10, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: log import failures in case of failed spec
parent
9d172d15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
qa/qa/specs/features/ee/api/1_manage/bulk_import_project_spec.rb
...pecs/features/ee/api/1_manage/bulk_import_project_spec.rb
+10
-18
No files found.
qa/qa/specs/features/ee/api/1_manage/bulk_import_project_spec.rb
View file @
96aeab5c
...
...
@@ -4,7 +4,7 @@ module QA
# 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
'
Gitlab migration
'
do
let
(
:import_wait_duration
)
{
{
max_duration:
300
,
sleep_interval:
2
}
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:user
)
do
...
...
@@ -49,10 +49,8 @@ module QA
imported_group
.
reload!
.
projects
end
let
(
:project_import_failures
)
do
imported_group
.
import_details
.
find
{
|
entity
|
entity
[
:destination_name
]
==
source_project
.
name
}
&
.
fetch
(
:failures
)
let
(
:import_failures
)
do
imported_group
.
import_details
.
sum
([])
{
|
details
|
details
[
:failures
]
}
end
before
do
...
...
@@ -63,7 +61,11 @@ module QA
source_project
.
tap
{
|
project
|
project
.
add_push_rules
(
member_check:
true
)
}
# fabricate source group and project
end
after
do
after
do
|
example
|
# Checking for failures in the test currently makes test very flaky
# Just log in case of failure until cause of network errors is found
Runtime
::
Logger
.
warn
(
"Import failures:
#{
import_failures
}
"
)
if
example
.
exception
&&
!
import_failures
.
empty?
user
.
remove_via_api!
ensure
Runtime
::
Feature
.
disable
(
:bulk_import_projects
)
...
...
@@ -80,11 +82,7 @@ module QA
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
imported_projects
.
count
).
to
eq
(
1
),
'Expected to have 1 imported project'
aggregate_failures
do
expect
(
imported_projects
.
first
).
to
eq
(
source_project
)
expect
(
project_import_failures
).
to
be_empty
,
"Expected no errors, was:
#{
project_import_failures
}
"
end
expect
(
imported_projects
.
first
).
to
eq
(
source_project
)
end
end
...
...
@@ -125,7 +123,6 @@ module QA
aggregate_failures
do
expect
(
imported_issues
.
count
).
to
eq
(
1
)
expect
(
imported_issue
.
reload!
).
to
eq
(
source_issue
)
expect
(
project_import_failures
).
to
be_empty
,
"Expected no errors, was:
#{
project_import_failures
}
"
end
end
end
...
...
@@ -182,7 +179,6 @@ module QA
expect
(
imported_commits
).
to
match_array
(
source_commits
)
expect
(
imported_tags
).
to
match_array
(
source_tags
)
expect
(
imported_branches
).
to
match_array
(
source_branches
)
expect
(
project_import_failures
).
to
be_empty
,
"Expected no errors, was:
#{
project_import_failures
}
"
end
end
end
...
...
@@ -199,11 +195,7 @@ module QA
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
imported_projects
.
count
).
to
eq
(
1
),
'Expected to have 1 imported project'
aggregate_failures
do
expect
(
imported_projects
.
first
.
wikis
).
to
eq
(
source_project
.
wikis
)
expect
(
project_import_failures
).
to
be_empty
,
"Expected no errors, was:
#{
project_import_failures
}
"
end
expect
(
imported_projects
.
first
.
wikis
).
to
eq
(
source_project
.
wikis
)
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