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
a3faf3bd
Commit
a3faf3bd
authored
Nov 09, 2021
by
Andrejs Cunskis
Committed by
Dan Davison
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Fail early for bulk project import test
parent
e9c593c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
...a/specs/features/api/1_manage/bulk_import_project_spec.rb
+13
-5
No files found.
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
View file @
a3faf3bd
...
@@ -48,8 +48,10 @@ module QA
...
@@ -48,8 +48,10 @@ module QA
imported_group
.
reload!
.
projects
imported_group
.
reload!
.
projects
end
end
let
(
:import_details
)
do
let
(
:project_import_failures
)
do
imported_group
.
import_details
.
find
{
|
entity
|
entity
[
:destination_name
]
==
source_project
.
name
}
imported_group
.
import_details
.
find
{
|
entity
|
entity
[
:destination_name
]
==
source_project
.
name
}
&
.
fetch
(
:failures
)
end
end
before
do
before
do
...
@@ -69,16 +71,20 @@ module QA
...
@@ -69,16 +71,20 @@ module QA
end
end
context
'with project'
do
context
'with project'
do
before
do
imported_group
# trigger import
end
it
(
it
(
'successfully imports project'
,
'successfully imports project'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2297'
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2297'
)
do
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
import
_details
[
:failures
]).
to
be_empty
,
"Expected to not have import errors, was:
#{
import_details
}
"
expect
(
import
ed_projects
.
count
).
to
eq
(
1
),
"Expected to have 1 imported project
"
aggregate_failures
do
aggregate_failures
do
expect
(
imported_projects
.
count
).
to
eq
(
1
)
expect
(
imported_projects
.
first
).
to
eq
(
source_project
)
expect
(
imported_projects
.
first
).
to
eq
(
source_project
)
expect
(
project_import_failures
).
to
be_empty
end
end
end
end
end
end
...
@@ -107,6 +113,7 @@ module QA
...
@@ -107,6 +113,7 @@ module QA
before
do
before
do
source_issue
# fabricate source group, project, issue
source_issue
# fabricate source group, project, issue
imported_group
# trigger import
end
end
it
(
it
(
...
@@ -114,11 +121,12 @@ module QA
...
@@ -114,11 +121,12 @@ module QA
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2325'
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2325'
)
do
)
do
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
{
imported_group
.
import_status
}.
to
eventually_eq
(
'finished'
).
within
(
import_wait_duration
)
expect
(
import
_details
[
:failures
]).
to
be_empty
,
"Expected to not have import errors, was:
#{
import_details
}
"
expect
(
import
ed_projects
.
count
).
to
eq
(
1
),
"Expected to have 1 imported project
"
aggregate_failures
do
aggregate_failures
do
expect
(
imported_issues
.
count
).
to
eq
(
1
)
expect
(
imported_issues
.
count
).
to
eq
(
1
)
expect
(
imported_issue
.
reload!
).
to
eq
(
source_issue
)
expect
(
imported_issue
.
reload!
).
to
eq
(
source_issue
)
expect
(
project_import_failures
).
to
be_empty
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