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
fa449937
Commit
fa449937
authored
Apr 14, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add failing diagnostic spec
parent
db7ab32c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
ee/spec/graphql/mutations/design_management/upload_spec.rb
ee/spec/graphql/mutations/design_management/upload_spec.rb
+36
-0
No files found.
ee/spec/graphql/mutations/design_management/upload_spec.rb
View file @
fa449937
...
...
@@ -12,6 +12,11 @@ describe Mutations::DesignManagement::Upload do
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
end
def
run_mutation
(
fs
=
files
)
mutation
=
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
mutation
.
resolve
(
project_path:
project
.
full_path
,
iid:
issue
.
iid
,
files:
fs
)
end
describe
"#resolve"
do
let
(
:files
)
{
[
fixture_file_upload
(
'spec/fixtures/dk.png'
)]
}
...
...
@@ -34,6 +39,37 @@ describe Mutations::DesignManagement::Upload do
enable_design_management
end
describe
'contention in the design repo'
do
let
(
:files
)
do
[
fixture_file_upload
(
'spec/fixtures/dk.png'
),
fixture_file_upload
(
'spec/fixtures/rails_sample.jpg'
),
fixture_file_upload
(
'spec/fixtures/banana_sample.gif'
)
].
cycle
(
20
).
to_a
end
describe
'running requests in parallel'
do
it
'does not cause errors'
do
expect
do
threads
=
files
.
map
do
|
f
|
Thread
.
new
{
run_mutation
([
f
])
}
end
threads
.
each
(
&
:join
)
end
.
not_to
raise_error
end
end
describe
'running requests in serial'
do
it
'does not cause errors'
do
expect
do
files
.
each
do
|
f
|
run_mutation
([
f
])
end
end
.
not_to
raise_error
end
end
end
context
"when the user is not allowed to upload designs"
do
let
(
:user
)
{
create
(
:user
)
}
...
...
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